diff --git a/src/CosmosDB/CosmosDB.Test/ScenarioTests/AccountTests.cs b/src/CosmosDB/CosmosDB.Test/ScenarioTests/AccountTests.cs index d207280b5b12..3e623ae56923 100644 --- a/src/CosmosDB/CosmosDB.Test/ScenarioTests/AccountTests.cs +++ b/src/CosmosDB/CosmosDB.Test/ScenarioTests/AccountTests.cs @@ -47,5 +47,12 @@ public void TestAccountRelatedCmdletsUsingObject() { TestController.NewInstance.RunPowerShellTest(_logger, "Test-AccountRelatedCmdletsUsingObject"); } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestAddRegionOperation() + { + TestController.NewInstance.RunPowerShellTest(_logger, "Test-AddRegionOperation"); + } } } \ No newline at end of file diff --git a/src/CosmosDB/CosmosDB.Test/ScenarioTests/AccountTests.ps1 b/src/CosmosDB/CosmosDB.Test/ScenarioTests/AccountTests.ps1 index d9b79d52cc5e..093d8cf249e6 100644 --- a/src/CosmosDB/CosmosDB.Test/ScenarioTests/AccountTests.ps1 +++ b/src/CosmosDB/CosmosDB.Test/ScenarioTests/AccountTests.ps1 @@ -166,4 +166,23 @@ function Test-AccountRelatedCmdletsUsingObject $IsAccountDeleted = Remove-AzCosmosDBAccount -InputObject $cosmosDBAccount -PassThru Assert-AreEqual $IsAccountDeleted true +} + +function Test-AddRegionOperation +{ + $rgName = "CosmosDBResourceGroup2" + $location = "East US" + $locationlist = "East US", "West US" + $cosmosDBAccountName = "testupdateregion" + $resourceGroup = New-AzResourceGroup -ResourceGroupName $rgName -Location $location + + $cosmosDBAccount = New-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName -Location $location -EnableMultipleWriteLocations -EnableAutomaticFailover + do + { + $cosmosDBAccount = Get-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName + } while ($cosmosDBAccount.ProvisioningState -ne "Succeeded") + + $updatedCosmosDBAccount = Update-AzCosmosDBAccountRegion -ResourceGroupName $rgName -Name $cosmosDBAccountName -Location $locationlist + $updatedCosmosDBAccount = Get-AzCosmosDBAccount -ResourceGroupName $rgName -Name $cosmosDBAccountName + Assert-AreEqual $cosmosDBAccount.Locations.Count $updatedCosmosDBAccount.Locations.Count - 1 } \ No newline at end of file diff --git a/src/CosmosDB/CosmosDB.Test/SessionRecords/Microsoft.Azure.Commands.CosmosDB.Test.ScenarioTests.ScenarioTest.AccountTests/TestAddRegionOperation.json b/src/CosmosDB/CosmosDB.Test/SessionRecords/Microsoft.Azure.Commands.CosmosDB.Test.ScenarioTests.ScenarioTest.AccountTests/TestAddRegionOperation.json new file mode 100644 index 000000000000..bf7933c631fe --- /dev/null +++ b/src/CosmosDB/CosmosDB.Test/SessionRecords/Microsoft.Azure.Commands.CosmosDB.Test.ScenarioTests.ScenarioTest.AccountTests/TestAddRegionOperation.json @@ -0,0 +1,1448 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourcegroups/CosmosDBResourceGroup2?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Jlc291cmNlZ3JvdXBzL0Nvc21vc0RCUmVzb3VyY2VHcm91cDI/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"East US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "23738968-12f7-422e-a3c5-880db18d7e3b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.11" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "07733550-663e-4e6a-9ab6-2c3cbcbb1cce" + ], + "x-ms-correlation-request-id": [ + "07733550-663e-4e6a-9ab6-2c3cbcbb1cce" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T001914Z:07733550-663e-4e6a-9ab6-2c3cbcbb1cce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:19:14 GMT" + ], + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2\",\r\n \"name\": \"CosmosDBResourceGroup2\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Jlc291cmNlR3JvdXBzL0Nvc21vc0RCUmVzb3VyY2VHcm91cDIvcHJvdmlkZXJzL01pY3Jvc29mdC5Eb2N1bWVudERCL2RhdGFiYXNlQWNjb3VudHMvdGVzdHVwZGF0ZXJlZ2lvbj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"kind\": \"GlobalDocumentDB\",\r\n \"properties\": {\r\n \"consistencyPolicy\": {\r\n \"defaultConsistencyLevel\": \"Session\"\r\n },\r\n \"locations\": [\r\n {\r\n \"locationName\": \"East US\",\r\n \"failoverPriority\": 0\r\n }\r\n ],\r\n \"isVirtualNetworkFilterEnabled\": false,\r\n \"enableAutomaticFailover\": true,\r\n \"virtualNetworkRules\": [],\r\n \"enableMultipleWriteLocations\": true,\r\n \"disableKeyBasedMetadataWriteAccess\": false,\r\n \"databaseAccountOfferType\": \"Standard\"\r\n },\r\n \"location\": \"East US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cb02cc9e-35b9-4ea2-b098-0c732649b4b2" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "545" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion/operationResults/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ], + "x-ms-request-id": [ + "e103aba9-25ed-4355-9fe9-bd241554cc4a" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "75b2bb28-70f9-4c60-91b9-6f092859d45c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T001923Z:75b2bb28-70f9-4c60-91b9-6f092859d45c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:19:22 GMT" + ], + "Content-Length": [ + "1473" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion\",\r\n \"name\": \"testupdateregion\",\r\n \"location\": \"East US\",\r\n \"type\": \"Microsoft.DocumentDB/databaseAccounts\",\r\n \"kind\": \"GlobalDocumentDB\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"ipRangeFilter\": \"\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"enableAutomaticFailover\": true,\r\n \"enableMultipleWriteLocations\": true,\r\n \"enablePartitionKeyMonitor\": false,\r\n \"isVirtualNetworkFilterEnabled\": false,\r\n \"virtualNetworkRules\": [],\r\n \"EnabledApiTypes\": \"Sql\",\r\n \"disableKeyBasedMetadataWriteAccess\": false,\r\n \"enableFreeTier\": false,\r\n \"apiProperties\": null,\r\n \"databaseAccountOfferType\": \"Standard\",\r\n \"enableCassandraConnector\": false,\r\n \"connectorOffer\": \"\",\r\n \"consistencyPolicy\": {\r\n \"defaultConsistencyLevel\": \"Session\",\r\n \"maxIntervalInSeconds\": 5,\r\n \"maxStalenessPrefix\": 100\r\n },\r\n \"configurationOverrides\": {},\r\n \"writeLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"provisioningState\": \"Creating\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"readLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"provisioningState\": \"Creating\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"locations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"provisioningState\": \"Creating\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"failoverPolicies\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"failoverPriority\": 0\r\n }\r\n ],\r\n \"cors\": [],\r\n \"capabilities\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "54fd0baa-1ea4-4bda-85f7-76025c5e34d1" + ], + "x-ms-correlation-request-id": [ + "54fd0baa-1ea4-4bda-85f7-76025c5e34d1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T001954Z:54fd0baa-1ea4-4bda-85f7-76025c5e34d1" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:19:53 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "9bdac0ec-04c4-4d51-8ccd-f949eba62e00" + ], + "x-ms-correlation-request-id": [ + "9bdac0ec-04c4-4d51-8ccd-f949eba62e00" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002024Z:9bdac0ec-04c4-4d51-8ccd-f949eba62e00" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:20:23 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "784e7569-e9a2-4f07-8026-68a072c2251b" + ], + "x-ms-correlation-request-id": [ + "784e7569-e9a2-4f07-8026-68a072c2251b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002054Z:784e7569-e9a2-4f07-8026-68a072c2251b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:20:53 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-request-id": [ + "b5fc03d1-841d-475b-af97-50341ed24217" + ], + "x-ms-correlation-request-id": [ + "b5fc03d1-841d-475b-af97-50341ed24217" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002124Z:b5fc03d1-841d-475b-af97-50341ed24217" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:21:23 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-request-id": [ + "90f550dc-9593-41ab-89d2-4e9d2a1dfe80" + ], + "x-ms-correlation-request-id": [ + "90f550dc-9593-41ab-89d2-4e9d2a1dfe80" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002154Z:90f550dc-9593-41ab-89d2-4e9d2a1dfe80" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:21:54 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-request-id": [ + "4192b187-17c5-45c6-ab98-53d797307fab" + ], + "x-ms-correlation-request-id": [ + "4192b187-17c5-45c6-ab98-53d797307fab" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002225Z:4192b187-17c5-45c6-ab98-53d797307fab" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:22:24 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-request-id": [ + "c081f365-78a9-4231-b9ab-29c2c325d0ce" + ], + "x-ms-correlation-request-id": [ + "c081f365-78a9-4231-b9ab-29c2c325d0ce" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002255Z:c081f365-78a9-4231-b9ab-29c2c325d0ce" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:22:54 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "158d33f2-c40d-4ca0-9370-729e5706d287" + ], + "x-ms-correlation-request-id": [ + "158d33f2-c40d-4ca0-9370-729e5706d287" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002344Z:158d33f2-c40d-4ca0-9370-729e5706d287" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:23:43 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "3f75ddcd-4133-46bf-b4c3-9e8aeebfe51e" + ], + "x-ms-correlation-request-id": [ + "3f75ddcd-4133-46bf-b4c3-9e8aeebfe51e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002414Z:3f75ddcd-4133-46bf-b4c3-9e8aeebfe51e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:24:13 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "20dbdad3-5dc8-485d-8bd8-04cf0eac801b" + ], + "x-ms-correlation-request-id": [ + "20dbdad3-5dc8-485d-8bd8-04cf0eac801b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002445Z:20dbdad3-5dc8-485d-8bd8-04cf0eac801b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:24:44 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "fee0efcb-c92a-42e8-a9d6-6e2a699ecba9" + ], + "x-ms-correlation-request-id": [ + "fee0efcb-c92a-42e8-a9d6-6e2a699ecba9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002515Z:fee0efcb-c92a-42e8-a9d6-6e2a699ecba9" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:25:14 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-request-id": [ + "275cfb1b-9aea-4f2d-8ee8-3b650a9881f3" + ], + "x-ms-correlation-request-id": [ + "275cfb1b-9aea-4f2d-8ee8-3b650a9881f3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002545Z:275cfb1b-9aea-4f2d-8ee8-3b650a9881f3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:25:45 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-request-id": [ + "97c48913-b9c6-450c-aa81-f2bfb3e7626a" + ], + "x-ms-correlation-request-id": [ + "97c48913-b9c6-450c-aa81-f2bfb3e7626a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002616Z:97c48913-b9c6-450c-aa81-f2bfb3e7626a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:26:15 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-request-id": [ + "978b1a90-4092-4a35-84c3-741be40b2058" + ], + "x-ms-correlation-request-id": [ + "978b1a90-4092-4a35-84c3-741be40b2058" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002646Z:978b1a90-4092-4a35-84c3-741be40b2058" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:26:45 GMT" + ], + "Content-Length": [ + "21" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Dequeued\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Byb3ZpZGVycy9NaWNyb3NvZnQuRG9jdW1lbnREQi9sb2NhdGlvbnMvZWFzdHVzL29wZXJhdGlvbnNTdGF0dXMvZTEwM2FiYTktMjVlZC00MzU1LTlmZTktYmQyNDE1NTRjYzRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-request-id": [ + "3967163f-ddad-4692-b4bd-918881ace917" + ], + "x-ms-correlation-request-id": [ + "3967163f-ddad-4692-b4bd-918881ace917" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002716Z:3967163f-ddad-4692-b4bd-918881ace917" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:27:16 GMT" + ], + "Content-Length": [ + "22" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/e103aba9-25ed-4355-9fe9-bd241554cc4a?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Jlc291cmNlR3JvdXBzL0Nvc21vc0RCUmVzb3VyY2VHcm91cDIvcHJvdmlkZXJzL01pY3Jvc29mdC5Eb2N1bWVudERCL2RhdGFiYXNlQWNjb3VudHMvdGVzdHVwZGF0ZXJlZ2lvbj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-request-id": [ + "3cdd12e2-63af-4439-a612-ab39c89e25a2" + ], + "x-ms-correlation-request-id": [ + "3cdd12e2-63af-4439-a612-ab39c89e25a2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002716Z:3cdd12e2-63af-4439-a612-ab39c89e25a2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:27:16 GMT" + ], + "Content-Length": [ + "1782" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion\",\r\n \"name\": \"testupdateregion\",\r\n \"location\": \"East US\",\r\n \"type\": \"Microsoft.DocumentDB/databaseAccounts\",\r\n \"kind\": \"GlobalDocumentDB\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"documentEndpoint\": \"https://testupdateregion.documents.azure.com:443/\",\r\n \"ipRangeFilter\": \"\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"enableAutomaticFailover\": true,\r\n \"enableMultipleWriteLocations\": true,\r\n \"enablePartitionKeyMonitor\": false,\r\n \"isVirtualNetworkFilterEnabled\": false,\r\n \"virtualNetworkRules\": [],\r\n \"EnabledApiTypes\": \"Sql\",\r\n \"disableKeyBasedMetadataWriteAccess\": false,\r\n \"enableFreeTier\": false,\r\n \"apiProperties\": null,\r\n \"databaseAccountOfferType\": \"Standard\",\r\n \"enableCassandraConnector\": false,\r\n \"connectorOffer\": \"\",\r\n \"consistencyPolicy\": {\r\n \"defaultConsistencyLevel\": \"Session\",\r\n \"maxIntervalInSeconds\": 5,\r\n \"maxStalenessPrefix\": 100\r\n },\r\n \"configurationOverrides\": {},\r\n \"writeLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"readLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"locations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"failoverPolicies\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"failoverPriority\": 0\r\n }\r\n ],\r\n \"cors\": [],\r\n \"capabilities\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Jlc291cmNlR3JvdXBzL0Nvc21vc0RCUmVzb3VyY2VHcm91cDIvcHJvdmlkZXJzL01pY3Jvc29mdC5Eb2N1bWVudERCL2RhdGFiYXNlQWNjb3VudHMvdGVzdHVwZGF0ZXJlZ2lvbj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "061a3fe8-12db-433a-8f05-d8897372b084" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11991" + ], + "x-ms-request-id": [ + "2226de94-11cf-4a0e-aaae-c030147767e3" + ], + "x-ms-correlation-request-id": [ + "2226de94-11cf-4a0e-aaae-c030147767e3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002717Z:2226de94-11cf-4a0e-aaae-c030147767e3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:27:16 GMT" + ], + "Content-Length": [ + "1782" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion\",\r\n \"name\": \"testupdateregion\",\r\n \"location\": \"East US\",\r\n \"type\": \"Microsoft.DocumentDB/databaseAccounts\",\r\n \"kind\": \"GlobalDocumentDB\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"documentEndpoint\": \"https://testupdateregion.documents.azure.com:443/\",\r\n \"ipRangeFilter\": \"\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"enableAutomaticFailover\": true,\r\n \"enableMultipleWriteLocations\": true,\r\n \"enablePartitionKeyMonitor\": false,\r\n \"isVirtualNetworkFilterEnabled\": false,\r\n \"virtualNetworkRules\": [],\r\n \"EnabledApiTypes\": \"Sql\",\r\n \"disableKeyBasedMetadataWriteAccess\": false,\r\n \"enableFreeTier\": false,\r\n \"apiProperties\": null,\r\n \"databaseAccountOfferType\": \"Standard\",\r\n \"enableCassandraConnector\": false,\r\n \"connectorOffer\": \"\",\r\n \"consistencyPolicy\": {\r\n \"defaultConsistencyLevel\": \"Session\",\r\n \"maxIntervalInSeconds\": 5,\r\n \"maxStalenessPrefix\": 100\r\n },\r\n \"configurationOverrides\": {},\r\n \"writeLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"readLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"locations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"failoverPolicies\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"failoverPriority\": 0\r\n }\r\n ],\r\n \"cors\": [],\r\n \"capabilities\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Jlc291cmNlR3JvdXBzL0Nvc21vc0RCUmVzb3VyY2VHcm91cDIvcHJvdmlkZXJzL01pY3Jvc29mdC5Eb2N1bWVudERCL2RhdGFiYXNlQWNjb3VudHMvdGVzdHVwZGF0ZXJlZ2lvbj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11990" + ], + "x-ms-request-id": [ + "48ba67d0-8052-4128-911b-d05954738e97" + ], + "x-ms-correlation-request-id": [ + "48ba67d0-8052-4128-911b-d05954738e97" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002722Z:48ba67d0-8052-4128-911b-d05954738e97" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:27:21 GMT" + ], + "Content-Length": [ + "1782" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion\",\r\n \"name\": \"testupdateregion\",\r\n \"location\": \"East US\",\r\n \"type\": \"Microsoft.DocumentDB/databaseAccounts\",\r\n \"kind\": \"GlobalDocumentDB\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"documentEndpoint\": \"https://testupdateregion.documents.azure.com:443/\",\r\n \"ipRangeFilter\": \"\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"enableAutomaticFailover\": true,\r\n \"enableMultipleWriteLocations\": true,\r\n \"enablePartitionKeyMonitor\": false,\r\n \"isVirtualNetworkFilterEnabled\": false,\r\n \"virtualNetworkRules\": [],\r\n \"EnabledApiTypes\": \"Sql\",\r\n \"disableKeyBasedMetadataWriteAccess\": false,\r\n \"enableFreeTier\": false,\r\n \"apiProperties\": null,\r\n \"databaseAccountOfferType\": \"Standard\",\r\n \"enableCassandraConnector\": false,\r\n \"connectorOffer\": \"\",\r\n \"consistencyPolicy\": {\r\n \"defaultConsistencyLevel\": \"Session\",\r\n \"maxIntervalInSeconds\": 5,\r\n \"maxStalenessPrefix\": 100\r\n },\r\n \"configurationOverrides\": {},\r\n \"writeLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"readLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"locations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"failoverPolicies\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"failoverPriority\": 0\r\n }\r\n ],\r\n \"cors\": [],\r\n \"capabilities\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Jlc291cmNlR3JvdXBzL0Nvc21vc0RCUmVzb3VyY2VHcm91cDIvcHJvdmlkZXJzL01pY3Jvc29mdC5Eb2N1bWVudERCL2RhdGFiYXNlQWNjb3VudHMvdGVzdHVwZGF0ZXJlZ2lvbj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3b3b4273-9570-46e0-8d37-8067f5c29981" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11989" + ], + "x-ms-request-id": [ + "3404ccd7-92a5-432c-8069-9ebb71391d50" + ], + "x-ms-correlation-request-id": [ + "3404ccd7-92a5-432c-8069-9ebb71391d50" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002722Z:3404ccd7-92a5-432c-8069-9ebb71391d50" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:27:21 GMT" + ], + "Content-Length": [ + "1782" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion\",\r\n \"name\": \"testupdateregion\",\r\n \"location\": \"East US\",\r\n \"type\": \"Microsoft.DocumentDB/databaseAccounts\",\r\n \"kind\": \"GlobalDocumentDB\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"documentEndpoint\": \"https://testupdateregion.documents.azure.com:443/\",\r\n \"ipRangeFilter\": \"\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"enableAutomaticFailover\": true,\r\n \"enableMultipleWriteLocations\": true,\r\n \"enablePartitionKeyMonitor\": false,\r\n \"isVirtualNetworkFilterEnabled\": false,\r\n \"virtualNetworkRules\": [],\r\n \"EnabledApiTypes\": \"Sql\",\r\n \"disableKeyBasedMetadataWriteAccess\": false,\r\n \"enableFreeTier\": false,\r\n \"apiProperties\": null,\r\n \"databaseAccountOfferType\": \"Standard\",\r\n \"enableCassandraConnector\": false,\r\n \"connectorOffer\": \"\",\r\n \"consistencyPolicy\": {\r\n \"defaultConsistencyLevel\": \"Session\",\r\n \"maxIntervalInSeconds\": 5,\r\n \"maxStalenessPrefix\": 100\r\n },\r\n \"configurationOverrides\": {},\r\n \"writeLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"readLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"locations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"failoverPolicies\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"failoverPriority\": 0\r\n }\r\n ],\r\n \"cors\": [],\r\n \"capabilities\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Jlc291cmNlR3JvdXBzL0Nvc21vc0RCUmVzb3VyY2VHcm91cDIvcHJvdmlkZXJzL01pY3Jvc29mdC5Eb2N1bWVudERCL2RhdGFiYXNlQWNjb3VudHMvdGVzdHVwZGF0ZXJlZ2lvbj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6b797f2c-27bc-4fbf-a48e-ce26e4e58d0d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "x-ms-request-id": [ + "a7dcc0e6-f49e-4dc7-a17a-bd11e81c6010" + ], + "x-ms-correlation-request-id": [ + "a7dcc0e6-f49e-4dc7-a17a-bd11e81c6010" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002722Z:a7dcc0e6-f49e-4dc7-a17a-bd11e81c6010" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:27:22 GMT" + ], + "Content-Length": [ + "1782" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion\",\r\n \"name\": \"testupdateregion\",\r\n \"location\": \"East US\",\r\n \"type\": \"Microsoft.DocumentDB/databaseAccounts\",\r\n \"kind\": \"GlobalDocumentDB\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"documentEndpoint\": \"https://testupdateregion.documents.azure.com:443/\",\r\n \"ipRangeFilter\": \"\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"enableAutomaticFailover\": true,\r\n \"enableMultipleWriteLocations\": true,\r\n \"enablePartitionKeyMonitor\": false,\r\n \"isVirtualNetworkFilterEnabled\": false,\r\n \"virtualNetworkRules\": [],\r\n \"EnabledApiTypes\": \"Sql\",\r\n \"disableKeyBasedMetadataWriteAccess\": false,\r\n \"enableFreeTier\": false,\r\n \"apiProperties\": null,\r\n \"databaseAccountOfferType\": \"Standard\",\r\n \"enableCassandraConnector\": false,\r\n \"connectorOffer\": \"\",\r\n \"consistencyPolicy\": {\r\n \"defaultConsistencyLevel\": \"Session\",\r\n \"maxIntervalInSeconds\": 5,\r\n \"maxStalenessPrefix\": 100\r\n },\r\n \"configurationOverrides\": {},\r\n \"writeLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"readLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"locations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"failoverPolicies\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"failoverPriority\": 0\r\n }\r\n ],\r\n \"cors\": [],\r\n \"capabilities\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMTIwNTNiOGYtY2FiNS00ZjVjLTljMWEtODcwNTgwMTQyYWJkL3Jlc291cmNlR3JvdXBzL0Nvc21vc0RCUmVzb3VyY2VHcm91cDIvcHJvdmlkZXJzL01pY3Jvc29mdC5Eb2N1bWVudERCL2RhdGFiYXNlQWNjb3VudHMvdGVzdHVwZGF0ZXJlZ2lvbj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"locations\": [\r\n {\r\n \"locationName\": \"East US\",\r\n \"failoverPriority\": 0\r\n },\r\n {\r\n \"locationName\": \"West US\",\r\n \"failoverPriority\": 1\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "01a759b9-79fb-4176-a95c-f896717a8d0c" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.CosmosDB.CosmosDBManagementClient/1.0.1.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "226" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion/operationResults/722f064d-c7ed-4fb8-9096-8ec36a0dc830?api-version=2019-08-01" + ], + "x-ms-request-id": [ + "722f064d-c7ed-4fb8-9096-8ec36a0dc830" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/providers/Microsoft.DocumentDB/locations/eastus/operationsStatus/722f064d-c7ed-4fb8-9096-8ec36a0dc830?api-version=2019-08-01" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-gatewayversion": [ + "version=2.10.0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "db5e0cff-8067-47b9-855b-71b855eb04bd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20200407T002721Z:db5e0cff-8067-47b9-855b-71b855eb04bd" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 07 Apr 2020 00:27:21 GMT" + ], + "Content-Length": [ + "1782" + ], + "Content-Type": [ + "application/json" + ], + "Content-Location": [ + "https://management.documents.azure.com:450/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion?api-version=2019-08-01" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/12053b8f-cab5-4f5c-9c1a-870580142abd/resourceGroups/CosmosDBResourceGroup2/providers/Microsoft.DocumentDB/databaseAccounts/testupdateregion\",\r\n \"name\": \"testupdateregion\",\r\n \"location\": \"East US\",\r\n \"type\": \"Microsoft.DocumentDB/databaseAccounts\",\r\n \"kind\": \"GlobalDocumentDB\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"documentEndpoint\": \"https://testupdateregion.documents.azure.com:443/\",\r\n \"ipRangeFilter\": \"\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"enableAutomaticFailover\": true,\r\n \"enableMultipleWriteLocations\": true,\r\n \"enablePartitionKeyMonitor\": false,\r\n \"isVirtualNetworkFilterEnabled\": false,\r\n \"virtualNetworkRules\": [],\r\n \"EnabledApiTypes\": \"Sql\",\r\n \"disableKeyBasedMetadataWriteAccess\": false,\r\n \"enableFreeTier\": false,\r\n \"apiProperties\": null,\r\n \"databaseAccountOfferType\": \"Standard\",\r\n \"enableCassandraConnector\": false,\r\n \"connectorOffer\": \"\",\r\n \"consistencyPolicy\": {\r\n \"defaultConsistencyLevel\": \"Session\",\r\n \"maxIntervalInSeconds\": 5,\r\n \"maxStalenessPrefix\": 100\r\n },\r\n \"configurationOverrides\": {},\r\n \"writeLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"readLocations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"locations\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"documentEndpoint\": \"https://testupdateregion-eastus.documents.azure.com:443/\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"failoverPriority\": 0,\r\n \"isZoneRedundant\": false\r\n }\r\n ],\r\n \"failoverPolicies\": [\r\n {\r\n \"id\": \"testupdateregion-eastus\",\r\n \"locationName\": \"East US\",\r\n \"failoverPriority\": 0\r\n }\r\n ],\r\n \"cors\": [],\r\n \"capabilities\": []\r\n }\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "12053b8f-cab5-4f5c-9c1a-870580142abd" + } +} \ No newline at end of file diff --git a/src/CosmosDB/CosmosDB/ChangeLog.md b/src/CosmosDB/CosmosDB/ChangeLog.md index 074e87c991a4..36bc16854ca6 100644 --- a/src/CosmosDB/CosmosDB/ChangeLog.md +++ b/src/CosmosDB/CosmosDB/ChangeLog.md @@ -19,13 +19,16 @@ --> ## Upcoming Release +* Changes in New-AzCosmosDBAccount and Update-AzCosmosDBAccount + - Allows empty string as a value for IpRangeFilter + - Renamed ApiKind value GlobalDocumentDB to Sql. + - Added parameter DisableKeyBasedMetadataWriteAccess * Introduces cmdlets to update throughput for Sql Database and Container, Cassandra Keyspace and Table, MongoDB Database and Collection, Gremlin Database and Graph and Table. - - Update-AzCosmosDBSqlContainerThroughput, Update-AzCosmosDBSqlDatabaseThroughput, - Update-AzCosmosDBMongoDBCollectionThroughput, Update-AzCosmosDBMongoDBDatabaseThroughput, - Update-AzCosmosDBGremlinGraphThroughput, Update-AzCosmosDBGremlinDatabaseThroughput, - Update-AzCosmosDBCassandraTableThroughput, Update-AzCosmosDBCassandraKeyspaceThroughput, - Update-AzCosmosDBTableThroughput - + - Update-AzCosmosDBSqlContainerThroughput, Update-AzCosmosDBSqlDatabaseThroughput, + Update-AzCosmosDBMongoDBCollectionThroughput, Update-AzCosmosDBMongoDBDatabaseThroughput, + Update-AzCosmosDBGremlinGraphThroughput, Update-AzCosmosDBGremlinDatabaseThroughput, + Update-AzCosmosDBCassandraTableThroughput, Update-AzCosmosDBCassandraKeyspaceThroughput, + Update-AzCosmosDBTableThroughput ## Version 0.1.3 * Allowing Account Creation for API Types: Gremlin, Cassandra and Table. * Bug Fixes diff --git a/src/CosmosDB/CosmosDB/CosmosDBAccount/NewAzCosmosDBAccount.cs b/src/CosmosDB/CosmosDB/CosmosDBAccount/NewAzCosmosDBAccount.cs index 3c8cf6ad5100..8027cc5c0c70 100644 --- a/src/CosmosDB/CosmosDB/CosmosDBAccount/NewAzCosmosDBAccount.cs +++ b/src/CosmosDB/CosmosDB/CosmosDBAccount/NewAzCosmosDBAccount.cs @@ -16,6 +16,7 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Linq; using System.Management.Automation; using Microsoft.Azure.Commands.CosmosDB.Helpers; using Microsoft.Azure.Commands.CosmosDB.Models; @@ -51,7 +52,7 @@ public class NewAzCosmosDBAccount : AzureCosmosDBCmdletBase public SwitchParameter EnableVirtualNetwork { get; set; } [Parameter(Mandatory = false, HelpMessage = Constants.IpRangeFilterHelpMessage)] - [ValidateNotNullOrEmpty] + [ValidateNotNull] public string[] IpRangeFilter { get; set; } [Parameter(Mandatory = false, HelpMessage = Constants.LocationHelpMessage)] @@ -81,9 +82,12 @@ public class NewAzCosmosDBAccount : AzureCosmosDBCmdletBase public PSVirtualNetworkRule[] VirtualNetworkRuleObject { get; set; } [Parameter(Mandatory = false, HelpMessage = Constants.ApiKindHelpMessage)] - [PSArgumentCompleter("GlobalDocumentDB", "MongoDB", "Gremlin", "Cassandra", "Table")] + [PSArgumentCompleter("Sql", "MongoDB", "Gremlin", "Cassandra", "Table")] public string ApiKind { get; set; } + [Parameter(Mandatory = false, HelpMessage = Constants.DisableKeyBasedMetadataWriteAccessHelpMessage)] + public SwitchParameter DisableKeyBasedMetadataWriteAccess { get; set; } + [Parameter(Mandatory = false, HelpMessage = Constants.AsJobHelpMessage)] public SwitchParameter AsJob { get; set; } @@ -191,15 +195,7 @@ public override void ExecuteCmdlet() string IpRangeFilterAsString = null; if (IpRangeFilter != null && IpRangeFilter.Length > 0) { - for (int i = 0; i < IpRangeFilter.Length; i++) - { - if (i == 0) - { - IpRangeFilterAsString = IpRangeFilter[0]; - } - else - IpRangeFilterAsString = string.Concat(IpRangeFilterAsString, ",", IpRangeFilter[i]); - } + IpRangeFilterAsString = IpRangeFilter?.Aggregate(string.Empty, (output, next) => string.Concat(output, (!string.IsNullOrWhiteSpace(output) && !string.IsNullOrWhiteSpace(next) ? "," : string.Empty), next)) ?? string.Empty; } DatabaseAccountCreateUpdateParameters databaseAccountCreateUpdateParameters = new DatabaseAccountCreateUpdateParameters(locations:LocationCollection, location: writeLocation, name:Name, consistencyPolicy:consistencyPolicy, tags:tags, ipRangeFilter:IpRangeFilterAsString); @@ -207,10 +203,12 @@ public override void ExecuteCmdlet() databaseAccountCreateUpdateParameters.IsVirtualNetworkFilterEnabled = EnableVirtualNetwork; databaseAccountCreateUpdateParameters.EnableAutomaticFailover = EnableAutomaticFailover; databaseAccountCreateUpdateParameters.VirtualNetworkRules = virtualNetworkRule; + databaseAccountCreateUpdateParameters.DisableKeyBasedMetadataWriteAccess = DisableKeyBasedMetadataWriteAccess; + databaseAccountCreateUpdateParameters.IpRangeFilter = IpRangeFilterAsString; if (!string.IsNullOrEmpty(ApiKind)) { - if (!ApiKind.Equals("GlobalDocumentDB", StringComparison.OrdinalIgnoreCase) && !ApiKind.Equals("MongoDB", StringComparison.OrdinalIgnoreCase)) + if (!ApiKind.Equals("MongoDB", StringComparison.OrdinalIgnoreCase)) { switch (ApiKind) { @@ -223,6 +221,8 @@ public override void ExecuteCmdlet() case "Table": databaseAccountCreateUpdateParameters.Capabilities = new List { new Capability { Name = "EnableTable" } }; break; + case "Sql": + break; } ApiKind = null; diff --git a/src/CosmosDB/CosmosDB/CosmosDBAccount/UpdateAzCosmosDBAccount.cs b/src/CosmosDB/CosmosDB/CosmosDBAccount/UpdateAzCosmosDBAccount.cs index 8d0313c4d320..ad21cc2ff6ee 100644 --- a/src/CosmosDB/CosmosDB/CosmosDBAccount/UpdateAzCosmosDBAccount.cs +++ b/src/CosmosDB/CosmosDB/CosmosDBAccount/UpdateAzCosmosDBAccount.cs @@ -51,16 +51,16 @@ public class UpdateAzCosmosDBAccount : AzureCosmosDBCmdletBase public string DefaultConsistencyLevel { get; set; } [Parameter(Mandatory = false, HelpMessage = Constants.EnableAutomaticFailoverHelpMessage)] - public bool EnableAutomaticFailover { get; set; } + public bool? EnableAutomaticFailover { get; set; } [Parameter(Mandatory = false, HelpMessage = Constants.EnableMultipleWriteLocationsHelpMessage)] - public bool EnableMultipleWriteLocations { get; set; } + public bool? EnableMultipleWriteLocations { get; set; } [Parameter(Mandatory = false, HelpMessage = Constants.EnableVirtualNetworkHelpMessage)] - public bool EnableVirtualNetwork { get; set; } + public bool? EnableVirtualNetwork { get; set; } [Parameter(Mandatory = false, HelpMessage = Constants.IpRangeFilterHelpMessage)] - [ValidateNotNullOrEmpty] + [ValidateNotNull] public string[] IpRangeFilter { get; set; } [Parameter(Mandatory = false, HelpMessage = Constants.MaxStalenessIntervalInSecondsHelpMessage)] @@ -81,6 +81,9 @@ public class UpdateAzCosmosDBAccount : AzureCosmosDBCmdletBase [ValidateNotNullOrEmpty] public PSVirtualNetworkRule[] VirtualNetworkRuleObject { get; set; } + [Parameter(Mandatory = false, HelpMessage = Constants.DisableKeyBasedMetadataWriteAccessHelpMessage)] + public bool? DisableKeyBasedMetadataWriteAccess { get; set; } + [Parameter(Mandatory = false, HelpMessage = Constants.AsJobHelpMessage)] public SwitchParameter AsJob { get; set; } @@ -103,10 +106,23 @@ public override void ExecuteCmdlet() DatabaseAccountGetResults readDatabase = CosmosDBManagementClient.DatabaseAccounts.GetWithHttpMessagesAsync(ResourceGroupName, Name).GetAwaiter().GetResult().Body; - DatabaseAccountUpdateParameters databaseAccountUpdateParameters = new DatabaseAccountUpdateParameters(locations: readDatabase.ReadLocations, location: readDatabase.WriteLocations.ElementAt(0).LocationName); - databaseAccountUpdateParameters.EnableMultipleWriteLocations = EnableMultipleWriteLocations; - databaseAccountUpdateParameters.IsVirtualNetworkFilterEnabled = EnableVirtualNetwork; - databaseAccountUpdateParameters.EnableAutomaticFailover = EnableAutomaticFailover; + DatabaseAccountUpdateParameters databaseAccountUpdateParameters = new DatabaseAccountUpdateParameters(locations: readDatabase.Locations, location: readDatabase.WriteLocations.ElementAt(0).LocationName); + if (EnableMultipleWriteLocations != null) + { + databaseAccountUpdateParameters.EnableMultipleWriteLocations = EnableMultipleWriteLocations; + } + if (EnableVirtualNetwork != null) + { + databaseAccountUpdateParameters.IsVirtualNetworkFilterEnabled = EnableVirtualNetwork; + } + if (EnableAutomaticFailover != null) + { + databaseAccountUpdateParameters.EnableAutomaticFailover = EnableAutomaticFailover; + } + if (DisableKeyBasedMetadataWriteAccess != null) + { + databaseAccountUpdateParameters.DisableKeyBasedMetadataWriteAccess = DisableKeyBasedMetadataWriteAccess; + } if (!string.IsNullOrEmpty(DefaultConsistencyLevel)) { @@ -172,20 +188,9 @@ public override void ExecuteCmdlet() databaseAccountUpdateParameters.VirtualNetworkRules = virtualNetworkRule; } - if (IpRangeFilter != null && IpRangeFilter.Length > 0) + if (IpRangeFilter != null) { - string IpRangeFilterAsString = null; - - for (int i = 0; i < IpRangeFilter.Length; i++) - { - if(i==0) - { - IpRangeFilterAsString = IpRangeFilter[0]; - } - else - IpRangeFilterAsString = string.Concat(IpRangeFilterAsString, ",", IpRangeFilter[i]); - } - + string IpRangeFilterAsString = IpRangeFilter?.Aggregate(string.Empty, (output, next) => string.Concat(output, (!string.IsNullOrWhiteSpace(output) && !string.IsNullOrWhiteSpace(next) ? "," : string.Empty), next)) ?? string.Empty; databaseAccountUpdateParameters.IpRangeFilter = IpRangeFilterAsString; } diff --git a/src/CosmosDB/CosmosDB/CosmosDBAccount/UpdateAzCosmosDBAccountRegion.cs b/src/CosmosDB/CosmosDB/CosmosDBAccount/UpdateAzCosmosDBAccountRegion.cs index 756a232ed407..029c81b44f79 100644 --- a/src/CosmosDB/CosmosDB/CosmosDBAccount/UpdateAzCosmosDBAccountRegion.cs +++ b/src/CosmosDB/CosmosDB/CosmosDBAccount/UpdateAzCosmosDBAccountRegion.cs @@ -76,9 +76,11 @@ public override void ExecuteCmdlet() { if (Location != null && Location.Length > 0) { + int failoverPriority = 0; foreach (string location in Location) { - locations.Add(new Location(location)); + locations.Add(new Location(locationName: location, failoverPriority: failoverPriority)); + failoverPriority++; } } if (LocationObject != null && LocationObject.Length > 0) diff --git a/src/CosmosDB/CosmosDB/Helpers/Constants.cs b/src/CosmosDB/CosmosDB/Helpers/Constants.cs index 5fa060708258..9f72655c947a 100644 --- a/src/CosmosDB/CosmosDB/Helpers/Constants.cs +++ b/src/CosmosDB/CosmosDB/Helpers/Constants.cs @@ -45,9 +45,10 @@ internal static class Constants public const string VirtualNetworkRuleObjectHelpMessage = "Array of PSVirtualNetworkRuleObjects for virtual network."; public const string VirtualNetworkRuleIdHelpMessage = "Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"; public const string IgnoreMissingVNetServiceEndpointHelpMessage = "Boolean to indicate if to create firewall rule before the virtual network has vnet service endpoint enabled."; - public const string ApiKindHelpMessage = "The type of Cosmos DB database account to create. Accepted values: GlobalDocumentDB, Sql, MongoDB, Gremlin, Table, Cassandra. Default value: GlobalDocumentDB "; + public const string ApiKindHelpMessage = "The type of Cosmos DB database account to create. Accepted values: Sql, MongoDB, Gremlin, Table, Cassandra. Default value: Sql "; public const string AccountKeyTypeHelpMessage = "Value from: {ConnectionStrings, Keys, ReadOnlyKeys}. Default is Keys."; - + public const string DisableKeyBasedMetadataWriteAccessHelpMessage = "Disable write operations on metadata resources (databases, containers, throughput) via account keys"; + //Sql cmdlets help messages public const string DatabaseNameHelpMessage = "Database name."; public const string ContainerNameHelpMessage = "Container name."; diff --git a/src/CosmosDB/CosmosDB/Models/PSDatabaseAccount.cs b/src/CosmosDB/CosmosDB/Models/PSDatabaseAccount.cs index bcc8d86d098a..df95d69a9b3d 100644 --- a/src/CosmosDB/CosmosDB/Models/PSDatabaseAccount.cs +++ b/src/CosmosDB/CosmosDB/Models/PSDatabaseAccount.cs @@ -31,6 +31,7 @@ public PSDatabaseAccount(DatabaseAccountGetResults databaseAccountGetResults) Location = databaseAccountGetResults.Location; EnableCassandraConnector = databaseAccountGetResults.EnableCassandraConnector; FailoverPolicies = databaseAccountGetResults.FailoverPolicies; + Locations = databaseAccountGetResults.Locations; ReadLocations = databaseAccountGetResults.ReadLocations; WriteLocations = databaseAccountGetResults.WriteLocations; Capabilities = databaseAccountGetResults.Capabilities; diff --git a/src/CosmosDB/CosmosDB/Models/PSIndexingPolicy.cs b/src/CosmosDB/CosmosDB/Models/PSIndexingPolicy.cs index 82147bab4854..ff894c2badba 100644 --- a/src/CosmosDB/CosmosDB/Models/PSIndexingPolicy.cs +++ b/src/CosmosDB/CosmosDB/Models/PSIndexingPolicy.cs @@ -25,10 +25,10 @@ public PSIndexingPolicy() public PSIndexingPolicy(IndexingPolicy indexingPolicy) { - Automatic = indexingPolicy.Automatic; - IndexingMode = indexingPolicy.IndexingMode; + Automatic = indexingPolicy?.Automatic; + IndexingMode = indexingPolicy?.IndexingMode; - if (indexingPolicy.IncludedPaths != null) + if (indexingPolicy?.IncludedPaths != null) { IncludedPaths = new List(); foreach (IncludedPath includedPath in indexingPolicy.IncludedPaths) @@ -37,7 +37,7 @@ public PSIndexingPolicy(IndexingPolicy indexingPolicy) } } - if (indexingPolicy.ExcludedPaths != null) + if (indexingPolicy?.ExcludedPaths != null) { ExcludedPaths = new List(); foreach (ExcludedPath excludedPath in indexingPolicy.ExcludedPaths) @@ -46,7 +46,7 @@ public PSIndexingPolicy(IndexingPolicy indexingPolicy) } } - if (indexingPolicy.CompositeIndexes != null) + if (indexingPolicy?.CompositeIndexes != null) { CompositeIndexes = new List>(); foreach (IList compositePathList in indexingPolicy.CompositeIndexes) @@ -60,7 +60,7 @@ public PSIndexingPolicy(IndexingPolicy indexingPolicy) } } - if (indexingPolicy.SpatialIndexes != null) + if (indexingPolicy?.SpatialIndexes != null) { SpatialIndexes = new List(); foreach (SpatialSpec spatialSpec in indexingPolicy.SpatialIndexes) diff --git a/src/CosmosDB/CosmosDB/Models/PSUniqueKeyPolicy.cs b/src/CosmosDB/CosmosDB/Models/PSUniqueKeyPolicy.cs index e36097d024ca..a2deaafea5f4 100644 --- a/src/CosmosDB/CosmosDB/Models/PSUniqueKeyPolicy.cs +++ b/src/CosmosDB/CosmosDB/Models/PSUniqueKeyPolicy.cs @@ -26,7 +26,7 @@ public PSUniqueKeyPolicy() public PSUniqueKeyPolicy(UniqueKeyPolicy uniqueKey) { UniqueKeys = new List(); - if (uniqueKey.UniqueKeys != null) + if (uniqueKey?.UniqueKeys != null) { foreach (UniqueKey key in uniqueKey.UniqueKeys) { diff --git a/src/CosmosDB/CosmosDB/SQL/GetAzCosmosDBSqlContainer.cs b/src/CosmosDB/CosmosDB/SQL/GetAzCosmosDBSqlContainer.cs index 5f09149da023..a9406d786b57 100644 --- a/src/CosmosDB/CosmosDB/SQL/GetAzCosmosDBSqlContainer.cs +++ b/src/CosmosDB/CosmosDB/SQL/GetAzCosmosDBSqlContainer.cs @@ -68,7 +68,7 @@ public override void ExecuteCmdlet() if (Detailed) { ThroughputSettingsGetResults throughputSettingsGetResults = CosmosDBManagementClient.SqlResources.GetSqlContainerThroughputWithHttpMessagesAsync(ResourceGroupName, AccountName, DatabaseName, Name).GetAwaiter().GetResult().Body; - WriteObject(throughputSettingsGetResults); + WriteObject(new PSThroughputSettingsGetResults(throughputSettingsGetResults)); } } else diff --git a/src/CosmosDB/CosmosDB/help/New-AzCosmosDBAccount.md b/src/CosmosDB/CosmosDB/help/New-AzCosmosDBAccount.md index 858ff6c0dcda..ad3e681802e3 100644 --- a/src/CosmosDB/CosmosDB/help/New-AzCosmosDBAccount.md +++ b/src/CosmosDB/CosmosDB/help/New-AzCosmosDBAccount.md @@ -17,8 +17,8 @@ New-AzCosmosDBAccount -ResourceGroupName -Name [-DefaultConsis [-EnableAutomaticFailover] [-EnableMultipleWriteLocations] [-EnableVirtualNetwork] [-IpRangeFilter ] [-Location ] [-LocationObject ] [-MaxStalenessIntervalInSeconds ] [-MaxStalenessPrefix ] [-Tag ] [-VirtualNetworkRule ] - [-VirtualNetworkRuleObject ] [-ApiKind ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-VirtualNetworkRuleObject ] [-ApiKind ] [-DisableKeyBasedMetadataWriteAccess] + [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -133,6 +133,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -DisableKeyBasedMetadataWriteAccess +Disable write operations on metadata resources (databases, containers, throughput) via account keys + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -EnableAutomaticFailover Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. diff --git a/src/CosmosDB/CosmosDB/help/Update-AzCosmosDBAccount.md b/src/CosmosDB/CosmosDB/help/Update-AzCosmosDBAccount.md index 3665629344ea..59aeff4674b8 100644 --- a/src/CosmosDB/CosmosDB/help/Update-AzCosmosDBAccount.md +++ b/src/CosmosDB/CosmosDB/help/Update-AzCosmosDBAccount.md @@ -18,8 +18,8 @@ Update-AzCosmosDBAccount -ResourceGroupName -Name [-DefaultCon [-EnableAutomaticFailover ] [-EnableMultipleWriteLocations ] [-EnableVirtualNetwork ] [-IpRangeFilter ] [-MaxStalenessIntervalInSeconds ] [-MaxStalenessPrefix ] [-Tag ] [-VirtualNetworkRule ] - [-VirtualNetworkRuleObject ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-VirtualNetworkRuleObject ] [-DisableKeyBasedMetadataWriteAccess ] [-AsJob] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### ByResourceIdParameterSet @@ -28,8 +28,8 @@ Update-AzCosmosDBAccount -ResourceId [-DefaultConsistencyLevel [-EnableAutomaticFailover ] [-EnableMultipleWriteLocations ] [-EnableVirtualNetwork ] [-IpRangeFilter ] [-MaxStalenessIntervalInSeconds ] [-MaxStalenessPrefix ] [-Tag ] [-VirtualNetworkRule ] - [-VirtualNetworkRuleObject ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-VirtualNetworkRuleObject ] [-DisableKeyBasedMetadataWriteAccess ] [-AsJob] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### ByObjectParameterSet @@ -38,8 +38,8 @@ Update-AzCosmosDBAccount -InputObject [-DefaultConsistencyLe [-EnableAutomaticFailover ] [-EnableMultipleWriteLocations ] [-EnableVirtualNetwork ] [-IpRangeFilter ] [-MaxStalenessIntervalInSeconds ] [-MaxStalenessPrefix ] [-Tag ] [-VirtualNetworkRule ] - [-VirtualNetworkRuleObject ] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-VirtualNetworkRuleObject ] [-DisableKeyBasedMetadataWriteAccess ] [-AsJob] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -137,6 +137,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -DisableKeyBasedMetadataWriteAccess +Disable write operations on metadata resources (databases, containers, throughput) via account keys + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -EnableAutomaticFailover Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. diff --git a/src/CosmosDB/CosmosDB/help/Update-AzCosmosDBAccountRegion.md b/src/CosmosDB/CosmosDB/help/Update-AzCosmosDBAccountRegion.md index d86a6f0f3d88..47cd2151416b 100644 --- a/src/CosmosDB/CosmosDB/help/Update-AzCosmosDBAccountRegion.md +++ b/src/CosmosDB/CosmosDB/help/Update-AzCosmosDBAccountRegion.md @@ -33,7 +33,10 @@ Update-AzCosmosDBAccountRegion [-Location ] [-LocationObject