From ea4ed638468f4fb21ae94962f6672791dabc2067 Mon Sep 17 00:00:00 2001 From: Wei Wei Date: Tue, 11 Feb 2020 18:21:46 +0800 Subject: [PATCH 1/2] [Storage] Support share usage --- .../ScenarioTests/StorageFileTests.cs | 9 +- .../ScenarioTests/StorageFileTests.ps1 | 42 + .../TestStorageFileShareGetUsage.json | 1011 +++++++++++++++++ src/Storage/Storage.Management/ChangeLog.md | 4 +- .../File/GetAzureStorageShare.cs | 71 +- .../Storage.Management/Models/PSShare.cs | 40 +- .../Storage.Management.format.ps1xml | 34 +- .../help/Get-AzRmStorageShare.md | 100 +- .../help/New-AzRmStorageShare.md | 20 +- .../help/Update-AzRmStorageShare.md | 22 +- .../Az.Storage/BreakingChangeIssues.csv | 3 + 11 files changed, 1294 insertions(+), 62 deletions(-) create mode 100644 src/Storage/Storage.Management.Test/SessionRecords/Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageFileTests/TestStorageFileShareGetUsage.json create mode 100644 tools/StaticAnalysis/Exceptions/Az.Storage/BreakingChangeIssues.csv diff --git a/src/Storage/Storage.Management.Test/ScenarioTests/StorageFileTests.cs b/src/Storage/Storage.Management.Test/ScenarioTests/StorageFileTests.cs index 9ac84cce0204..b6e559dfef6d 100644 --- a/src/Storage/Storage.Management.Test/ScenarioTests/StorageFileTests.cs +++ b/src/Storage/Storage.Management.Test/ScenarioTests/StorageFileTests.cs @@ -36,6 +36,13 @@ public StorageFileTests(ITestOutputHelper output) public void TestStorageFileShare() { TestController.NewInstance.RunPsTest(_logger, "Test-StorageFileShare"); - } + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestStorageFileShareGetUsage() + { + TestController.NewInstance.RunPsTest(_logger, "Test-StorageFileShareGetUsage"); + } } } diff --git a/src/Storage/Storage.Management.Test/ScenarioTests/StorageFileTests.ps1 b/src/Storage/Storage.Management.Test/ScenarioTests/StorageFileTests.ps1 index 54cb52a670df..d2cc85e897ec 100644 --- a/src/Storage/Storage.Management.Test/ScenarioTests/StorageFileTests.ps1 +++ b/src/Storage/Storage.Management.Test/ScenarioTests/StorageFileTests.ps1 @@ -99,5 +99,47 @@ function Test-StorageFileShare } } +function Test-StorageFileShareGetUsage +{ + # Setup + $rgname = Get-StorageManagementTestResourceName; + + try + { + # Test + $stoname = 'sto' + $rgname; + $stotype = 'Standard_GRS'; + $loc = Get-ProviderLocation ResourceManagement; + $kind = 'StorageV2' + $shareName = "share"+ $rgname + + Write-Verbose "RGName: $rgname | Loc: $loc" + New-AzResourceGroup -Name $rgname -Location $loc; + + New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype -Kind $kind + $stos = Get-AzStorageAccount -ResourceGroupName $rgname; + + New-AzRmStorageShare -ResourceGroupName $rgname -StorageAccountName $stoname -Name $shareName + $share = Get-AzRmStorageShare -ResourceGroupName $rgname -StorageAccountName $stoname -Name $shareName + Assert-AreEqual $rgname $share.ResourceGroupName + Assert-AreEqual $stoname $share.StorageAccountName + Assert-AreEqual $shareName $share.Name + + # Get share usage + $share = Get-AzRmStorageShare -ResourceGroupName $rgname -StorageAccountName $stoname -Name $shareName -GetShareUsage + Assert-AreEqual $shareName $share.Name + Assert-AreEqual 0 $share.ShareUsageBytes + Assert-AreEqual $null $share.Deleted + + + Remove-AzStorageAccount -Force -ResourceGroupName $rgname -Name $stoname; + } + finally + { + # Cleanup + Clean-ResourceGroup $rgname + } +} + diff --git a/src/Storage/Storage.Management.Test/SessionRecords/Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageFileTests/TestStorageFileShareGetUsage.json b/src/Storage/Storage.Management.Test/SessionRecords/Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageFileTests/TestStorageFileShareGetUsage.json new file mode 100644 index 000000000000..a9f5aface25c --- /dev/null +++ b/src/Storage/Storage.Management.Test/SessionRecords/Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageFileTests/TestStorageFileShareGetUsage.json @@ -0,0 +1,1011 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4011ea76-cd2a-4456-9ded-4ddc364b9332" + ], + "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.19" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "f0bcc8f6-42e1-4ab9-baf2-e5f49685a1a8" + ], + "x-ms-correlation-request-id": [ + "f0bcc8f6-42e1-4ab9-baf2-e5f49685a1a8" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080737Z:f0bcc8f6-42e1-4ab9-baf2-e5f49685a1a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:07:37 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "12336" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"authorizations\": [\r\n {\r\n \"applicationId\": \"a6aa9161-5291-40bb-8c5c-923b567bee3b\",\r\n \"roleDefinitionId\": \"070ab87f-0efc-4423-b18b-756f3bdb0236\"\r\n },\r\n {\r\n \"applicationId\": \"e406a681-f3d4-42a8-90b6-c2b029497af1\"\r\n }\r\n ],\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/asyncoperations\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/listAccountSas\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/listServiceSas\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/blobServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/tableServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/queueServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/fileServices\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-07-01\",\r\n \"2016-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/usages\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-07-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"usages\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-03-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\",\r\n \"2016-05-01\",\r\n \"2016-01-01\",\r\n \"2015-06-15\",\r\n \"2015-05-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/checkNameAvailability\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"Australia Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 (Stage)\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-06-01\",\r\n \"2019-04-01\",\r\n \"2018-11-01\",\r\n \"2018-07-01\",\r\n \"2018-02-01\",\r\n \"2017-10-01\",\r\n \"2017-06-01\",\r\n \"2016-12-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"East US 2 (Stage)\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US 2\",\r\n \"Central US\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"East US 2 (Stage)\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US 2\",\r\n \"Central US\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"Brazil South\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"Canada East\",\r\n \"Canada Central\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"UAE North\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"East US 2 EUAP\",\r\n \"Central US EUAP\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourcegroups/pstestrg8016?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlZ3JvdXBzL3BzdGVzdHJnODAxNj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "662f3d81-4f03-4ca0-8691-d37b1fef35cb" + ], + "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.19" + ], + "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": [ + "f499f21b-0658-4b41-9df0-b136446699cf" + ], + "x-ms-correlation-request-id": [ + "f499f21b-0658-4b41-9df0-b136446699cf" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080740Z:f499f21b-0658-4b41-9df0-b136446699cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:07:40 GMT" + ], + "Content-Length": [ + "177" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016\",\r\n \"name\": \"pstestrg8016\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/checkNameAvailability?api-version=2019-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxOS0wNi0wMQ==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"stopstestrg8016\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4241118b-4a79-4afa-8c69-d7baf8501deb" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/17.1.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "81" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9628eea2-0501-4490-bbe1-f1d417d0b440" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-correlation-request-id": [ + "8943c1dd-edae-4a66-9e67-38da85608225" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080742Z:8943c1dd-edae-4a66-9e67-38da85608225" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:07:41 GMT" + ], + "Content-Length": [ + "22" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"nameAvailable\": true\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016?api-version=2019-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnODAxNi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0b3BzdGVzdHJnODAxNj9hcGktdmVyc2lvbj0yMDE5LTA2LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "86dcec41-431a-4f04-a5dc-584592c6c607" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/17.1.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "99" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/westus/asyncoperations/ddd48560-4e37-43eb-80f7-c5a919c65763?monitor=true&api-version=2019-06-01" + ], + "Retry-After": [ + "17" + ], + "x-ms-request-id": [ + "ddd48560-4e37-43eb-80f7-c5a919c65763" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "c035a37a-33d4-4418-a8de-75f8c7347b0e" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080748Z:c035a37a-33d4-4418-a8de-75f8c7347b0e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:07:48 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/westus/asyncoperations/ddd48560-4e37-43eb-80f7-c5a919c65763?monitor=true&api-version=2019-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvd2VzdHVzL2FzeW5jb3BlcmF0aW9ucy9kZGQ0ODU2MC00ZTM3LTQzZWItODBmNy1jNWE5MTljNjU3NjM/bW9uaXRvcj10cnVlJmFwaS12ZXJzaW9uPTIwMTktMDYtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/17.1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d25ae463-4440-4d07-a3de-d1fd42778392" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-correlation-request-id": [ + "ae59fb13-8a85-4952-927e-33eac451cf83" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080805Z:ae59fb13-8a85-4952-927e-33eac451cf83" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:08:05 GMT" + ], + "Content-Length": [ + "1317" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016\",\r\n \"name\": \"stopstestrg8016\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"privateEndpointConnections\": [],\r\n \"networkAcls\": {\r\n \"bypass\": \"AzureServices\",\r\n \"virtualNetworkRules\": [],\r\n \"ipRules\": [],\r\n \"defaultAction\": \"Allow\"\r\n },\r\n \"supportsHttpsTrafficOnly\": true,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2020-07-23T08:07:47.9801226Z\"\r\n },\r\n \"blob\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2020-07-23T08:07:47.9801226Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"accessTier\": \"Hot\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2020-07-23T08:07:47.8550962Z\",\r\n \"primaryEndpoints\": {\r\n \"dfs\": \"https://stopstestrg8016.dfs.core.windows.net/\",\r\n \"web\": \"https://stopstestrg8016.z22.web.core.windows.net/\",\r\n \"blob\": \"https://stopstestrg8016.blob.core.windows.net/\",\r\n \"queue\": \"https://stopstestrg8016.queue.core.windows.net/\",\r\n \"table\": \"https://stopstestrg8016.table.core.windows.net/\",\r\n \"file\": \"https://stopstestrg8016.file.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"westus\",\r\n \"statusOfPrimary\": \"available\",\r\n \"secondaryLocation\": \"eastus\",\r\n \"statusOfSecondary\": \"available\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016?api-version=2019-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnODAxNi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0b3BzdGVzdHJnODAxNj9hcGktdmVyc2lvbj0yMDE5LTA2LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "050fbd74-9cc9-49d2-bd75-db8609267d45" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/17.1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d160a0ae-aa42-4e9c-941d-c0a36bcecd68" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-correlation-request-id": [ + "88b2fad7-be34-4714-a252-4570023ba337" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080806Z:88b2fad7-be34-4714-a252-4570023ba337" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:08:05 GMT" + ], + "Content-Length": [ + "1317" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016\",\r\n \"name\": \"stopstestrg8016\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"privateEndpointConnections\": [],\r\n \"networkAcls\": {\r\n \"bypass\": \"AzureServices\",\r\n \"virtualNetworkRules\": [],\r\n \"ipRules\": [],\r\n \"defaultAction\": \"Allow\"\r\n },\r\n \"supportsHttpsTrafficOnly\": true,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2020-07-23T08:07:47.9801226Z\"\r\n },\r\n \"blob\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2020-07-23T08:07:47.9801226Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"accessTier\": \"Hot\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2020-07-23T08:07:47.8550962Z\",\r\n \"primaryEndpoints\": {\r\n \"dfs\": \"https://stopstestrg8016.dfs.core.windows.net/\",\r\n \"web\": \"https://stopstestrg8016.z22.web.core.windows.net/\",\r\n \"blob\": \"https://stopstestrg8016.blob.core.windows.net/\",\r\n \"queue\": \"https://stopstestrg8016.queue.core.windows.net/\",\r\n \"table\": \"https://stopstestrg8016.table.core.windows.net/\",\r\n \"file\": \"https://stopstestrg8016.file.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"westus\",\r\n \"statusOfPrimary\": \"available\",\r\n \"secondaryLocation\": \"eastus\",\r\n \"statusOfSecondary\": \"available\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts?api-version=2019-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnODAxNi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzP2FwaS12ZXJzaW9uPTIwMTktMDYtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "03efc3b1-e3df-493c-b241-b4cb9f44c82a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/17.1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "449d164a-f28d-4c53-8f51-5e8476757f83" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-correlation-request-id": [ + "8bb7c499-06dc-4b99-a8d3-bb90a61c5f49" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080806Z:8bb7c499-06dc-4b99-a8d3-bb90a61c5f49" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:08:05 GMT" + ], + "Content-Length": [ + "1329" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016\",\r\n \"name\": \"stopstestrg8016\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"privateEndpointConnections\": [],\r\n \"networkAcls\": {\r\n \"bypass\": \"AzureServices\",\r\n \"virtualNetworkRules\": [],\r\n \"ipRules\": [],\r\n \"defaultAction\": \"Allow\"\r\n },\r\n \"supportsHttpsTrafficOnly\": true,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2020-07-23T08:07:47.9801226Z\"\r\n },\r\n \"blob\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2020-07-23T08:07:47.9801226Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"accessTier\": \"Hot\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2020-07-23T08:07:47.8550962Z\",\r\n \"primaryEndpoints\": {\r\n \"dfs\": \"https://stopstestrg8016.dfs.core.windows.net/\",\r\n \"web\": \"https://stopstestrg8016.z22.web.core.windows.net/\",\r\n \"blob\": \"https://stopstestrg8016.blob.core.windows.net/\",\r\n \"queue\": \"https://stopstestrg8016.queue.core.windows.net/\",\r\n \"table\": \"https://stopstestrg8016.table.core.windows.net/\",\r\n \"file\": \"https://stopstestrg8016.file.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"westus\",\r\n \"statusOfPrimary\": \"available\",\r\n \"secondaryLocation\": \"eastus\",\r\n \"statusOfSecondary\": \"available\"\r\n }\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016/fileServices/default/shares/sharepstestrg8016?api-version=2019-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnODAxNi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0b3BzdGVzdHJnODAxNi9maWxlU2VydmljZXMvZGVmYXVsdC9zaGFyZXMvc2hhcmVwc3Rlc3RyZzgwMTY/YXBpLXZlcnNpb249MjAxOS0wNi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "73f9b0ec-b883-4ead-a2f5-abe0d953d892" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/17.1.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"0x8D82EDF884E5224\"" + ], + "x-ms-request-id": [ + "15d60182-c402-484c-841f-26f97b996be8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "40f43585-e7f9-4dd8-a685-a3eec1ee4700" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080807Z:40f43585-e7f9-4dd8-a685-a3eec1ee4700" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:08:06 GMT" + ], + "Content-Length": [ + "284" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016/fileServices/default/shares/sharepstestrg8016\",\r\n \"name\": \"sharepstestrg8016\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices/shares\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016/fileServices/default/shares/sharepstestrg8016?api-version=2019-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnODAxNi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0b3BzdGVzdHJnODAxNi9maWxlU2VydmljZXMvZGVmYXVsdC9zaGFyZXMvc2hhcmVwc3Rlc3RyZzgwMTY/YXBpLXZlcnNpb249MjAxOS0wNi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c86a7834-b9e6-4adc-b07e-93fd4a3b379d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/17.1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"0x8D82EDF884E5224\"" + ], + "x-ms-request-id": [ + "3c1ec5bf-a0ef-43b6-88a0-ef832423317f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-correlation-request-id": [ + "63b29f17-aa94-497f-b74b-13c443ffbb82" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080807Z:63b29f17-aa94-497f-b74b-13c443ffbb82" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:08:06 GMT" + ], + "Content-Length": [ + "398" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016/fileServices/default/shares/sharepstestrg8016\",\r\n \"name\": \"sharepstestrg8016\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices/shares\",\r\n \"etag\": \"\\\"0x8D82EDF884E5224\\\"\",\r\n \"properties\": {\r\n \"lastModifiedTime\": \"2020-07-23T08:08:07Z\",\r\n \"shareQuota\": 5120\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016/fileServices/default/shares/sharepstestrg8016?api-version=2019-06-01&$expand=stats", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnODAxNi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0b3BzdGVzdHJnODAxNi9maWxlU2VydmljZXMvZGVmYXVsdC9zaGFyZXMvc2hhcmVwc3Rlc3RyZzgwMTY/YXBpLXZlcnNpb249MjAxOS0wNi0wMSYkZXhwYW5kPXN0YXRz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "acd63ffa-526d-4ed7-a7dc-d7606c0cc2cb" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/17.1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"0x8D82EDF884E5224\"" + ], + "x-ms-request-id": [ + "e6fff686-182a-4a0d-ad64-cd43e5c93de1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-correlation-request-id": [ + "9df1dd03-f265-4001-90bc-ae2eb5da65aa" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080808Z:9df1dd03-f265-4001-90bc-ae2eb5da65aa" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:08:07 GMT" + ], + "Content-Length": [ + "418" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016/fileServices/default/shares/sharepstestrg8016\",\r\n \"name\": \"sharepstestrg8016\",\r\n \"type\": \"Microsoft.Storage/storageAccounts/fileServices/shares\",\r\n \"etag\": \"\\\"0x8D82EDF884E5224\\\"\",\r\n \"properties\": {\r\n \"shareUsageBytes\": 0,\r\n \"lastModifiedTime\": \"2020-07-23T08:08:07Z\",\r\n \"shareQuota\": 5120\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg8016/providers/Microsoft.Storage/storageAccounts/stopstestrg8016?api-version=2019-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnODAxNi9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0b3BzdGVzdHJnODAxNj9hcGktdmVyc2lvbj0yMDE5LTA2LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2ce7da5c-f51a-4f58-a6b2-186d4fc3013e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/17.1.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e843725b-fc5d-4f27-a39a-ef70b651305a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "ac5f1a75-88fa-4e09-9a7d-1752e01b7cd7" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080814Z:ac5f1a75-88fa-4e09-9a7d-1752e01b7cd7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:08:13 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourcegroups/pstestrg8016?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlZ3JvdXBzL3BzdGVzdHJnODAxNj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f359715a-046b-4079-b631-e9ec6cd73bf8" + ], + "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.19" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzgwMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "18c0be97-5bbd-4bf5-a181-e436a67f1fc2" + ], + "x-ms-correlation-request-id": [ + "18c0be97-5bbd-4bf5-a181-e436a67f1fc2" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080817Z:18c0be97-5bbd-4bf5-a181-e436a67f1fc2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:08:16 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzgwMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVTFSRlUxUlNSemd3TVRZdFYwVlRWRlZUSWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTWlmUT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.19" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzgwMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "a64cdf66-0833-4de3-b792-3454aa0ade2b" + ], + "x-ms-correlation-request-id": [ + "a64cdf66-0833-4de3-b792-3454aa0ade2b" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080832Z:a64cdf66-0833-4de3-b792-3454aa0ade2b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:08:31 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzgwMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVTFSRlUxUlNSemd3TVRZdFYwVlRWRlZUSWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTWlmUT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.19" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzgwMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "ead281a7-53b1-443d-907a-555bee069d66" + ], + "x-ms-correlation-request-id": [ + "ead281a7-53b1-443d-907a-555bee069d66" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080847Z:ead281a7-53b1-443d-907a-555bee069d66" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:08:47 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzgwMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVTFSRlUxUlNSemd3TVRZdFYwVlRWRlZUSWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTWlmUT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.19" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-request-id": [ + "20ddc125-9e33-44c3-8d71-9a6ad06e0993" + ], + "x-ms-correlation-request-id": [ + "20ddc125-9e33-44c3-8d71-9a6ad06e0993" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080903Z:20ddc125-9e33-44c3-8d71-9a6ad06e0993" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:09:02 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzgwMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVTFSRlUxUlNSemd3TVRZdFYwVlRWRlZUSWl3aWFtOWlURzlqWVhScGIyNGlPaUozWlhOMGRYTWlmUT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.27817.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18363.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.19" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-request-id": [ + "f150d49a-ee62-4367-a025-f194f9bb64e5" + ], + "x-ms-correlation-request-id": [ + "f150d49a-ee62-4367-a025-f194f9bb64e5" + ], + "x-ms-routing-request-id": [ + "KOREASOUTH:20200723T080903Z:f150d49a-ee62-4367-a025-f194f9bb64e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 23 Jul 2020 08:09:02 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "Test-StorageFileShareGetUsage": [ + "pstestrg8016" + ] + }, + "Variables": { + "SubscriptionId": "45b60d85-fd72-427a-a708-f994d26e593e" + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Management/ChangeLog.md b/src/Storage/Storage.Management/ChangeLog.md index 657f2d34fb18..5673b3181475 100644 --- a/src/Storage/Storage.Management/ChangeLog.md +++ b/src/Storage/Storage.Management/ChangeLog.md @@ -23,7 +23,9 @@ - `New-AzStorageContainerSASToken` * support create account Sas token with new permission x,t,f - `New-AzStorageAccountSASToken` - +* Support get single file share usage + - `Get-AzRmStorageShare` + ## Version 2.3.0 * Fixed the issue that UserAgent is not added for some data plane cmdlets. * Supported create/update Storage account with MinimumTlsVersion and AllowBlobPublicAccess diff --git a/src/Storage/Storage.Management/File/GetAzureStorageShare.cs b/src/Storage/Storage.Management/File/GetAzureStorageShare.cs index f9d6483fb1ac..863e8c5e1b1a 100644 --- a/src/Storage/Storage.Management/File/GetAzureStorageShare.cs +++ b/src/Storage/Storage.Management/File/GetAzureStorageShare.cs @@ -16,30 +16,44 @@ using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; -using System; -using System.Collections.Generic; +using Microsoft.Rest.Azure; using System.Management.Automation; namespace Microsoft.Azure.Commands.Management.Storage { - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMStoragePrefix + StorageShareNounStr, DefaultParameterSetName = AccountNameParameterSet), OutputType(typeof(PSShare))] + [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMStoragePrefix + StorageShareNounStr, DefaultParameterSetName = AccountNameSingleParameterSet), OutputType(typeof(PSShare))] public class GetAzureStorageShareCommand : StorageFileBaseCmdlet { /// - /// AccountName Parameter Set + /// AccountName list Parameter Set /// private const string AccountNameParameterSet = "AccountName"; /// - /// Account object parameter set + /// Account object list parameter set /// private const string AccountObjectParameterSet = "AccountObject"; + /// + /// AccountName Parameter Set + /// + private const string AccountNameSingleParameterSet = "AccountNameSingle"; + + /// + /// Account object parameter set + /// + private const string AccountObjectSingleParameterSet = "AccountObjectSingle"; + /// /// Share ResourceId parameter set /// private const string ShareResourceIdParameterSet = "ShareResourceId"; + [Parameter( + Position = 0, + Mandatory = true, + HelpMessage = "Resource Group Name.", + ParameterSetName = AccountNameSingleParameterSet)] [Parameter( Position = 0, Mandatory = true, @@ -48,6 +62,11 @@ public class GetAzureStorageShareCommand : StorageFileBaseCmdlet [ValidateNotNullOrEmpty] public string ResourceGroupName { get; set; } + [Parameter( + Position = 1, + Mandatory = true, + HelpMessage = "Storage Account Name.", + ParameterSetName = AccountNameSingleParameterSet)] [Parameter( Position = 1, Mandatory = true, @@ -57,6 +76,10 @@ public class GetAzureStorageShareCommand : StorageFileBaseCmdlet [ValidateNotNullOrEmpty] public string StorageAccountName { get; set; } + [Parameter(Mandatory = true, + HelpMessage = "Storage account object", + ValueFromPipeline = true, + ParameterSetName = AccountObjectSingleParameterSet)] [Parameter(Mandatory = true, HelpMessage = "Storage account object", ValueFromPipeline = true, @@ -75,15 +98,32 @@ public class GetAzureStorageShareCommand : StorageFileBaseCmdlet [Alias("N", "ShareName")] [Parameter(HelpMessage = "Share Name", - Mandatory = false)] + Mandatory = true, + ParameterSetName = AccountObjectSingleParameterSet)] + [Parameter(HelpMessage = "Share Name", + Mandatory = false, + ParameterSetName = AccountNameSingleParameterSet)] public string Name { get; set; } + + [Parameter(HelpMessage = "Specify this parameter to get the Share Usage in Bytes.", + Mandatory = false, + ParameterSetName = AccountObjectSingleParameterSet)] + [Parameter(HelpMessage = "Specify this parameter to get the Share Usage in Bytes.", + Mandatory = false, + ParameterSetName = AccountNameSingleParameterSet)] + [Parameter(HelpMessage = "Specify this parameter to get the Share Usage in Bytes.", + Mandatory = false, + ParameterSetName = ShareResourceIdParameterSet)] + public SwitchParameter GetShareUsage { get; set; } + public override void ExecuteCmdlet() { base.ExecuteCmdlet(); switch (ParameterSetName) { + case AccountObjectSingleParameterSet: case AccountObjectParameterSet: this.ResourceGroupName = StorageAccount.ResourceGroupName; this.StorageAccountName = StorageAccount.StorageAccountName; @@ -95,24 +135,35 @@ public override void ExecuteCmdlet() this.Name = shareResource.ResourceName; break; default: - // For AccountNameParameterSet, the ResourceGroupName and StorageAccountName can get from input directly + // For AccountNameParameterSet, AccountNameSingleParameterSet, the ResourceGroupName and StorageAccountName can get from input directly break; } if (!string.IsNullOrEmpty(this.Name)) { + GetShareExpand? expend = null; + if(this.GetShareUsage) + { + expend = GetShareExpand.Stats; + } var Share = this.StorageClient.FileShares.Get( this.ResourceGroupName, this.StorageAccountName, - this.Name); + this.Name, + expend); WriteObject(new PSShare(Share)); } else { - var Shares = this.StorageClient.FileShares.List( + IPage shares = this.StorageClient.FileShares.List( this.ResourceGroupName, this.StorageAccountName); - WriteShareList(Shares); + WriteShareList(shares); + while (shares.NextPageLink != null) + { + shares = this.StorageClient.FileShares.ListNext(shares.NextPageLink); + WriteShareList(shares); + } } } } diff --git a/src/Storage/Storage.Management/Models/PSShare.cs b/src/Storage/Storage.Management/Models/PSShare.cs index 8521916abe05..5034de3c3f29 100644 --- a/src/Storage/Storage.Management/Models/PSShare.cs +++ b/src/Storage/Storage.Management/Models/PSShare.cs @@ -39,6 +39,16 @@ public PSShare(StorageModels.FileShare share) this.Etag = share.Etag; this.LastModifiedTime = share.LastModifiedTime; this.QuotaGiB = share.ShareQuota; + this.Version = share.Version; + this.Deleted = share.Deleted; + this.DeletedTime = share.DeletedTime; + this.RemainingRetentionDays = share.RemainingRetentionDays; + this.EnabledProtocols = share.EnabledProtocols; + this.RootSquash = share.RootSquash; + this.ShareUsageBytes = share.ShareUsageBytes; + this.AccessTier = share.AccessTier; + this.AccessTierChangeTime = share.AccessTierChangeTime; + this.AccessTierStatus = share.AccessTierStatus; } public PSShare(FileShareItem share) @@ -52,6 +62,16 @@ public PSShare(FileShareItem share) this.Etag = share.Etag; this.LastModifiedTime = share.LastModifiedTime; this.QuotaGiB = share.ShareQuota; + this.Version = share.Version; + this.Deleted = share.Deleted; + this.DeletedTime = share.DeletedTime; + this.RemainingRetentionDays = share.RemainingRetentionDays; + this.EnabledProtocols = share.EnabledProtocols; + this.RootSquash = share.RootSquash; + this.ShareUsageBytes = share.ShareUsageBytes; + this.AccessTier = share.AccessTier; + this.AccessTierChangeTime = share.AccessTierChangeTime; + this.AccessTierStatus = share.AccessTierStatus; } [Ps1Xml(Label = "ResourceGroupName", Target = ViewControl.List, Position = 0)] @@ -78,7 +98,25 @@ public PSShare(FileShareItem share) [Ps1Xml(Label = "LastModifiedTime", Target = ViewControl.List, ScriptBlock = "$_.LastModifiedTime.ToString(\"u\")", Position = 5)] public DateTime? LastModifiedTime { get; set; } - + [Ps1Xml(Label = "Version", Target = ViewControl.List, Position = 7)] + public string Version { get; set; } + + public bool? Deleted { get; private set; } + + [Ps1Xml(Label = "DeletedTime", Target = ViewControl.List, ScriptBlock = "$_.DeletedTime.ToString(\"u\")", Position = 6)] + public DateTime? DeletedTime { get; private set; } + + public int? RemainingRetentionDays { get; private set; } + + public string EnabledProtocols { get; set; } + public string RootSquash { get; set; } + + public string AccessTier { get; set; } + public DateTime? AccessTierChangeTime { get; } + public string AccessTierStatus { get; } + + public long? ShareUsageBytes { get; } + public static string ParseResourceGroupFromId(string idFromServer) { if (!string.IsNullOrEmpty(idFromServer)) diff --git a/src/Storage/Storage.Management/Storage.Management.format.ps1xml b/src/Storage/Storage.Management/Storage.Management.format.ps1xml index 54af647505e8..896ebdb73d8a 100644 --- a/src/Storage/Storage.Management/Storage.Management.format.ps1xml +++ b/src/Storage/Storage.Management/Storage.Management.format.ps1xml @@ -336,6 +336,10 @@ Microsoft.Azure.Commands.Management.Storage.Models.PSShare + + $_.ResourceGroupName + ", StorageAccountName: " + $_.StorageAccountName + + @@ -344,23 +348,27 @@ Left - + Left - + Left - + Left - + Left - + + + + Left + @@ -372,23 +380,27 @@ Left - StorageAccountName + QuotaGiB Left - ResourceGroupName + EnabledProtocol Left - Etag + AccessTier Left - QuotaGiB - + Deleted + + + Left + Version + Left - $_.LastModifiedTime.ToString("u") + ShareUsageBytes diff --git a/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md b/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md index c3478636537a..77efcf6dc641 100644 --- a/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md +++ b/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md @@ -12,21 +12,33 @@ Gets or lists Storage file shares. ## SYNTAX -### AccountName (Default) +### AccountNameSingle (Default) ``` Get-AzRmStorageShare [-ResourceGroupName] [-StorageAccountName] [-Name ] + [-GetShareUsage] [-DefaultProfile ] [] +``` + +### AccountName +``` +Get-AzRmStorageShare [-ResourceGroupName] [-StorageAccountName] [-DefaultProfile ] [] ``` -### AccountObject +### AccountObjectSingle ``` -Get-AzRmStorageShare -StorageAccount [-Name ] +Get-AzRmStorageShare -StorageAccount -Name [-GetShareUsage] [-DefaultProfile ] [] ``` +### AccountObject +``` +Get-AzRmStorageShare -StorageAccount [-DefaultProfile ] + [] +``` + ### ShareResourceId ``` -Get-AzRmStorageShare [-ResourceId] [-Name ] [-DefaultProfile ] +Get-AzRmStorageShare [-ResourceId] [-GetShareUsage] [-DefaultProfile ] [] ``` @@ -37,38 +49,57 @@ The **Get-AzRmStorageShare** cmdlet gets or lists Storage file shares. ### Example 1: Get a Storage file share with Storage account name and share name ``` -PS C:\>Get-AzRmStorageShare -ResourceGroupName "myResourceGroup" -StorageAccountName "myStorageAccount" -Name "myshare" +PS C:\>Get-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -Name StorageAccountName ResourceGroupName Etag QuotaGiB LastModifiedTime ----- ------------------ ----------------- ---- -------- ---------------- -myshare myStorageAccount myResourceGroup "0x8D71F03028DDDC9" 5120 2019-08-12 08:56:48Z + ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount + +Name QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes +---- -------- ---------------- ---------- ------- ------- --------------- +myshare 5120 ``` This command gets a Storage file share with Storage account name and share name. ### Example 2: List all Storage file shares of a Storage account ``` -PS C:\>Get-AzRmStorageShare -ResourceGroupName "myResourceGroup" -StorageAccountName "myStorageAccount" +PS C:\>Get-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" + + ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount -Name StorageAccountName ResourceGroupName Etag QuotaGiB LastModifiedTime ----- ------------------ ----------------- ---- -------- ---------------- -share1 myStorageAccount myResourceGroup "0x8D71F03028DDDC9" 5120 2019-08-12 08:56:48Z -share2 myStorageAccount myResourceGroup "0x8D6FF862774FE57" 5120 2019-07-03 07:14:57Z +Name QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes +---- -------- ---------------- ---------- ------- ------- --------------- +share1 5120 TransactionOptimized +share2 5120 TransactionOptimized ``` This command lists all Storage file shares of a Storage account with Storage account name. ### Example 3: Get a Storage blob container with Storage account object and container name. ``` -Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -StorageAccountName "myStorageAccount" | Get-AzRmStorageShare -Name "myshare" +Get-AzStorageAccount -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" | Get-AzRmStorageShare -Name "myshare" -Name StorageAccountName ResourceGroupName Etag QuotaGiB LastModifiedTime ----- ------------------ ----------------- ---- -------- ---------------- -myshare myStorageAccount myResourceGroup "0x8D71F03028DDDC9" 5120 2019-08-12 08:56:48Z + ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount + +Name QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes +---- -------- ---------------- ---------- ------- ------- --------------- +myshare 5120 ``` This command gets a Storage blob container with Storage account object and container name. +### Example 4: Get a Storage file share with the share usage in bytes +``` +PS C:\>Get-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -GetShareUsage + + ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount + +Name QuotaGiB EnabledProtocol5 AccessTier Deleted Version ShareUsageBytes +---- -------- ---------------- ---------- ------- ------- --------------- +myshare 5120 2097152 +``` + +This command gets a Storage file share with Storage account name and share name, and include the share usage in bytes. + ## PARAMETERS ### -DefaultProfile @@ -86,12 +117,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -GetShareUsage +Specify this parameter to get the Share Usage in Bytes. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: AccountNameSingle, AccountObjectSingle, ShareResourceId +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Name Share Name ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: AccountNameSingle Aliases: N, ShareName Required: False @@ -101,12 +147,24 @@ Accept pipeline input: False Accept wildcard characters: False ``` +```yaml +Type: System.String +Parameter Sets: AccountObjectSingle +Aliases: N, ShareName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. ```yaml Type: System.String -Parameter Sets: AccountName +Parameter Sets: AccountNameSingle, AccountName Aliases: Required: True @@ -136,7 +194,7 @@ Storage account object ```yaml Type: Microsoft.Azure.Commands.Management.Storage.Models.PSStorageAccount -Parameter Sets: AccountObject +Parameter Sets: AccountObjectSingle, AccountObject Aliases: Required: True @@ -151,7 +209,7 @@ Storage Account Name. ```yaml Type: System.String -Parameter Sets: AccountName +Parameter Sets: AccountNameSingle, AccountName Aliases: AccountName Required: True diff --git a/src/Storage/Storage.Management/help/New-AzRmStorageShare.md b/src/Storage/Storage.Management/help/New-AzRmStorageShare.md index 6cd0a5c1be7a..179a658a81c2 100644 --- a/src/Storage/Storage.Management/help/New-AzRmStorageShare.md +++ b/src/Storage/Storage.Management/help/New-AzRmStorageShare.md @@ -32,22 +32,26 @@ The **New-AzRmStorageShare** cmdlet creates a Storage file share. ### Example 1: Create a Storage file share with Storage account name and share name, with metadata and share quota as 100 GiB. ``` -PS C:\>New-AzRmStorageShare -ResourceGroupName "myResourceGroup" -StorageAccountName "myStorageAccount" -Name "myshare" -QuotaGiB 100 -Metadata @{"tag1" = "value1"; "tag2" = "value2" } +PS C:\>New-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -QuotaGiB 100 -Metadata @{"tag1" = "value1"; "tag2" = "value2" } -Name StorageAccountName ResourceGroupName Etag QuotaGiB LastModifiedTime ----- ------------------ ----------------- ---- -------- ---------------- -myshare myStorageAccount myResourceGroup + ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount + +Name QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes +---- -------- ---------------- ---------- ------- ------- --------------- +myshare ``` This command creates a Storage file share with metadata and share quota as 100 GiB. ### Example 2: Create a Storage file share with Storage account object ``` -Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -StorageAccountName "myStorageAccount" | New-AzRmStorageShare -Name "myshare" +Get-AzStorageAccount -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" | New-AzRmStorageShare -Name "myshare" + + ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount -Name StorageAccountName ResourceGroupName Etag QuotaGiB LastModifiedTime ----- ------------------ ----------------- ---- -------- ---------------- -myshare myStorageAccount myResourceGroup +Name QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes +---- -------- ---------------- ---------- ------- ------- --------------- +myshare ``` This command creates a Storage file share with Storage account object and share name. diff --git a/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md b/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md index 7b40e4a2ac85..62d7aab2cd8f 100644 --- a/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md +++ b/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md @@ -44,13 +44,15 @@ The **New-AzRmStorageShare** cmdlet modifies a Storage file share. ### Example 1: Modifies a Storage file share's metadata and share quota with Storage account name and share name ``` -PS C:\>$share = Update-AzRmStorageShare -ResourceGroupName "myResourceGroup" -StorageAccountName "myStorageAccount" -Name "myshare" -QuotaGiB 200 -Metadata @{tag0="value0";tag1="value1"} +PS C:\>$share = Update-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" -Name "myshare" -QuotaGiB 200 -Metadata @{tag0="value0";tag1="value1"} PS C:\>$share -Name StorageAccountName ResourceGroupName Etag QuotaGiB LastModifiedTime ----- ------------------ ----------------- ---- -------- ---------------- -myshare myStorageAccount myResourceGroup 200 + ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount + +Name QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes +---- -------- ---------------- ---------- ------- ------- --------------- +myshare 200 PS C:\>$share.Metadata @@ -72,12 +74,14 @@ This command modifies metadata on a Storage file share with Storage account obje ### Example 3: Modifies share quota for all Storage file shares in a Storage account with pipeline ``` -PS C:\>Get-AzRmStorageShare -ResourceGroupName "myResourceGroup" -StorageAccountName "myStorageAccount" | Update-AzRmStorageShare -QuotaGiB 5000 +PS C:\>Get-AzRmStorageShare -ResourceGroupName "myresourcegroup" -StorageAccountName "mystorageaccount" | Update-AzRmStorageShare -QuotaGiB 5000 + + ResourceGroupName: myresourcegroup, StorageAccountName: mystorageaccount -Name StorageAccountName ResourceGroupName Etag QuotaGiB LastModifiedTime ----- ------------------ ----------------- ---- -------- ---------------- -share1 myStorageAccount myResourceGroup 5000 -share2 myStorageAccount myResourceGroup 5000 +Name QuotaGiB EnabledProtocols AccessTier Deleted Version ShareUsageBytes +---- -------- ---------------- ---------- ------- ------- --------------- +share1 5000 +share2 5000 ``` This command modifies share quota as 5000 GiB for all Storage file shares in a Storage account with pipeline. diff --git a/tools/StaticAnalysis/Exceptions/Az.Storage/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Storage/BreakingChangeIssues.csv new file mode 100644 index 000000000000..d33973cc8f09 --- /dev/null +++ b/tools/StaticAnalysis/Exceptions/Az.Storage/BreakingChangeIssues.csv @@ -0,0 +1,3 @@ +"Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.GetAzureStorageShareCommand","Get-AzRmStorageShare","0","1050","The parameter set 'AccountObject' for cmdlet 'Get-AzRmStorageShare' has been removed.","Add parameter set 'AccountObject' back to cmdlet 'Get-AzRmStorageShare'." +"Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.GetAzureStorageShareCommand","Get-AzRmStorageShare","0","1050","The parameter set 'ShareResourceId' for cmdlet 'Get-AzRmStorageShare' has been removed.","Add parameter set 'ShareResourceId' back to cmdlet 'Get-AzRmStorageShare'." +"Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.GetAzureStorageShareCommand","Get-AzRmStorageShare","0","1050","The parameter set '__AllParameterSets' for cmdlet 'Get-AzRmStorageShare' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'Get-AzRmStorageShare'." \ No newline at end of file From 7bc601f62fe10754bc148851453f24f0e0982150 Mon Sep 17 00:00:00 2001 From: Wei Wei Date: Fri, 24 Jul 2020 10:53:53 +0800 Subject: [PATCH 2/2] [Storage] Add back -Name in parameter set ShareResourceId --- .../Storage.Management/File/GetAzureStorageShare.cs | 9 +++++++++ .../Storage.Management/help/Get-AzRmStorageShare.md | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Storage/Storage.Management/File/GetAzureStorageShare.cs b/src/Storage/Storage.Management/File/GetAzureStorageShare.cs index 863e8c5e1b1a..1a02d6bae25c 100644 --- a/src/Storage/Storage.Management/File/GetAzureStorageShare.cs +++ b/src/Storage/Storage.Management/File/GetAzureStorageShare.cs @@ -17,6 +17,7 @@ using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; using Microsoft.Rest.Azure; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Management.Automation; namespace Microsoft.Azure.Commands.Management.Storage @@ -87,6 +88,7 @@ public class GetAzureStorageShareCommand : StorageFileBaseCmdlet [ValidateNotNullOrEmpty] public PSStorageAccount StorageAccount { get; set; } + [CmdletParameterBreakingChange("ResourceId", ChangeDescription = "Will not allow to input '-ResourceId', '-Name' together in a future release, since name info is already inclouded in ResourceId.")] [Parameter( Position = 0, Mandatory = true, @@ -103,6 +105,9 @@ public class GetAzureStorageShareCommand : StorageFileBaseCmdlet [Parameter(HelpMessage = "Share Name", Mandatory = false, ParameterSetName = AccountNameSingleParameterSet)] + [Parameter(HelpMessage = "Share Name", + Mandatory = false, + ParameterSetName = ShareResourceIdParameterSet)] public string Name { get; set; } @@ -129,6 +134,10 @@ public override void ExecuteCmdlet() this.StorageAccountName = StorageAccount.StorageAccountName; break; case ShareResourceIdParameterSet: + if (!string.IsNullOrEmpty(this.Name)) + { + WriteWarning("The -Name parameter will be omit, as -ResourceId already contains share name."); + } ResourceIdentifier shareResource = new ResourceIdentifier(ResourceId); this.ResourceGroupName = shareResource.ResourceGroupName; this.StorageAccountName = PSBlobServiceProperties.GetStorageAccountNameFromResourceId(ResourceId); diff --git a/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md b/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md index 77efcf6dc641..2655cabe9304 100644 --- a/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md +++ b/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md @@ -38,8 +38,8 @@ Get-AzRmStorageShare -StorageAccount [-DefaultProfile [-GetShareUsage] [-DefaultProfile ] - [] +Get-AzRmStorageShare [-ResourceId] [-Name ] [-GetShareUsage] + [-DefaultProfile ] [] ``` ## DESCRIPTION @@ -137,7 +137,7 @@ Share Name ```yaml Type: System.String -Parameter Sets: AccountNameSingle +Parameter Sets: AccountNameSingle, ShareResourceId Aliases: N, ShareName Required: False