From 71d2b54478e28250168980d61b912a4c082c4aa3 Mon Sep 17 00:00:00 2001 From: Wei Wei Date: Tue, 8 Jun 2021 17:31:14 +0800 Subject: [PATCH] [Storage] Support NFSV3 in create account --- .../ScenarioTests/StorageAccountTests.cs | 9 + .../ScenarioTests/StorageAccountTests.ps1 | 57 +- ...TestNewAzureStorageAccountEnableNfsV3.json | 750 ++++++++++++++++++ src/Storage/Storage.Management/ChangeLog.md | 3 + .../StorageAccount/NewAzureStorageAccount.cs | 23 +- .../help/New-AzStorageAccount.md | 37 +- 6 files changed, 871 insertions(+), 8 deletions(-) create mode 100644 src/Storage/Storage.Management.Test/SessionRecords/Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageAccountTests/TestNewAzureStorageAccountEnableNfsV3.json diff --git a/src/Storage/Storage.Management.Test/ScenarioTests/StorageAccountTests.cs b/src/Storage/Storage.Management.Test/ScenarioTests/StorageAccountTests.cs index 5d5f9b975de7..293d02440e4a 100644 --- a/src/Storage/Storage.Management.Test/ScenarioTests/StorageAccountTests.cs +++ b/src/Storage/Storage.Management.Test/ScenarioTests/StorageAccountTests.cs @@ -253,5 +253,14 @@ public void TestStorageBlobInventory() { TestRunner.RunTestScript("Test-StorageBlobInventory"); } + + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestNewAzureStorageAccountEnableNfsV3() + { + TestRunner.RunTestScript("Test-NewAzureStorageAccountEnableNfsV3"); + } + } } diff --git a/src/Storage/Storage.Management.Test/ScenarioTests/StorageAccountTests.ps1 b/src/Storage/Storage.Management.Test/ScenarioTests/StorageAccountTests.ps1 index 4d236209db2e..a3975943fbdc 100644 --- a/src/Storage/Storage.Management.Test/ScenarioTests/StorageAccountTests.ps1 +++ b/src/Storage/Storage.Management.Test/ScenarioTests/StorageAccountTests.ps1 @@ -1408,7 +1408,7 @@ function Test-NewSetAzureStorageAccountAllowSharedKeyAccess Assert-AreEqual $stotype $sto.Sku.Name; Assert-AreEqual $loc.ToLower().Replace(" ", "") $sto.Location; Assert-AreEqual $kind $sto.Kind; - #Assert-AreEqual $false $sto.AllowSharedKeyAccess + Assert-AreEqual $false $sto.AllowSharedKeyAccess Set-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -AllowSharedKeyAccess $true -EnableHttpsTrafficOnly $true @@ -1417,7 +1417,7 @@ function Test-NewSetAzureStorageAccountAllowSharedKeyAccess Assert-AreEqual $stotype $sto.Sku.Name; Assert-AreEqual $loc.ToLower().Replace(" ", "") $sto.Location; Assert-AreEqual $kind $sto.Kind; - #Assert-AreEqual $true $sto.AllowSharedKeyAccess + Assert-AreEqual $true $sto.AllowSharedKeyAccess Remove-AzStorageAccount -Force -ResourceGroupName $rgname -Name $stoname; } @@ -1946,4 +1946,57 @@ function Test-StorageBlobInventory # Cleanup Clean-ResourceGroup $rgname } +} + + +<# +.SYNOPSIS +Test Test-NewAzureStorageAccountEnableNfsV3 +.DESCRIPTION +SmokeTest +#> +function Test-NewAzureStorageAccountEnableNfsV3 +{ + # Setup + $rgname = Get-StorageManagementTestResourceName; + + try + { + # Test + $stoname = 'sto' + $rgname; + $stotype = 'Standard_LRS'; + $loc = Get-ProviderLocation_Canary ResourceManagement; + $kind = 'StorageV2' + + $rg = New-AzResourceGroup -Name $rgname -Location $loc; + Write-Output ("Resource Group created") + + ## Create a vnet and subnet in same location, then get the subnet resource id + # New-AzVirtualNetwork -ResourceGroupName $rgname -Location $loc -AddressPrefix 10.0.0.0/24 -Name "vnet1" + # $subnet = Get-AzVirtualNetwork -ResourceGroupName $rgname -Name "vnet1" | Add-AzVirtualNetworkSubnetConfig -Name "subnet1" -AddressPrefix "10.0.0.0/28" -ServiceEndpoint "Microsoft.Storage" | Set-AzVirtualNetwork + # $vnet1 = $subnet.Id + $vnet1 = "$($rg.ResourceId)/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + + New-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -SkuName $stotype ` + -EnableNfsV3 $true ` + -EnableHierarchicalNamespace $true ` + -EnableHttpsTrafficOnly $false ` + -NetworkRuleSet (@{bypass="Logging,Metrics";defaultAction="allow";virtualNetworkRules=(@{VirtualNetworkResourceId="$vnet1";Action="allow"})}) + + Retry-IfException { $global:sto = Get-AzStorageAccount -ResourceGroupName $rgname -Name $stoname; } + Assert-AreEqual $stoname $sto.StorageAccountName; + Assert-AreEqual $stotype $sto.Sku.Name; + Assert-AreEqual $loc.ToLower().Replace(" ", "") $sto.Location; + Assert-AreEqual $kind $sto.Kind; + Assert-AreEqual $true $sto.EnableHierarchicalNamespace + Assert-AreEqual $false $sto.EnableHttpsTrafficOnly + Assert-AreEqual $true $sto.EnableNfsV3 + + Remove-AzStorageAccount -Force -ResourceGroupName $rgname -Name $stoname; + } + finally + { + # Cleanup + Clean-ResourceGroup $rgname + } } \ No newline at end of file diff --git a/src/Storage/Storage.Management.Test/SessionRecords/Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageAccountTests/TestNewAzureStorageAccountEnableNfsV3.json b/src/Storage/Storage.Management.Test/SessionRecords/Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageAccountTests/TestNewAzureStorageAccountEnableNfsV3.json new file mode 100644 index 000000000000..39e7f596d11d --- /dev/null +++ b/src/Storage/Storage.Management.Test/SessionRecords/Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageAccountTests/TestNewAzureStorageAccountEnableNfsV3.json @@ -0,0 +1,750 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourcegroups/pstestrg1987?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlZ3JvdXBzL3BzdGVzdHJnMTk4Nz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"eastus2euap\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c8f72249-96e3-495e-8d6f-d5e6a6da1e0a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "33" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "42fb0585-2e88-4ea3-a607-6256e93df0e1" + ], + "x-ms-correlation-request-id": [ + "42fb0585-2e88-4ea3-a607-6256e93df0e1" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T053916Z:42fb0585-2e88-4ea3-a607-6256e93df0e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:39:15 GMT" + ], + "Content-Length": [ + "182" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg1987\",\r\n \"name\": \"pstestrg1987\",\r\n \"location\": \"eastus2euap\",\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=2021-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAyMS0wNC0wMQ==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"stopstestrg1987\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "43bf691c-4a7d-4b43-a41a-24c6a145785b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/19.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "81" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f099cd49-d73c-40f1-8304-3c13fe9d0c4b" + ], + "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": [ + "962faaf8-a9a2-4591-97b6-d024299d035a" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T053917Z:962faaf8-a9a2-4591-97b6-d024299d035a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:39:17 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/pstestrg1987/providers/Microsoft.Storage/storageAccounts/stopstestrg1987?api-version=2021-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnMTk4Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0b3BzdGVzdHJnMTk4Nz9hcGktdmVyc2lvbj0yMDIxLTA0LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"networkAcls\": {\r\n \"bypass\": \"Logging,Metrics\",\r\n \"virtualNetworkRules\": [\r\n {\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/weitest/providers/Microsoft.Network/virtualNetworks/vnettry1/subnets/subnet1\",\r\n \"action\": \"Allow\"\r\n }\r\n ],\r\n \"defaultAction\": \"Allow\"\r\n },\r\n \"supportsHttpsTrafficOnly\": false,\r\n \"isHnsEnabled\": true,\r\n \"isNfsV3Enabled\": true\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "43bf691c-4a7d-4b43-a41a-24c6a145785b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/19.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "578" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/79e48f95-3acb-4023-8f9f-2b7a279fca86?monitor=true&api-version=2021-04-01" + ], + "Retry-After": [ + "17" + ], + "x-ms-request-id": [ + "79e48f95-3acb-4023-8f9f-2b7a279fca86" + ], + "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": [ + "4437668f-b779-4128-9035-f8f2d837dd8b" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T053925Z:4437668f-b779-4128-9035-f8f2d837dd8b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:39:25 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/eastus2euap/asyncoperations/79e48f95-3acb-4023-8f9f-2b7a279fca86?monitor=true&api-version=2021-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3RvcmFnZS9sb2NhdGlvbnMvZWFzdHVzMmV1YXAvYXN5bmNvcGVyYXRpb25zLzc5ZTQ4Zjk1LTNhY2ItNDAyMy04ZjlmLTJiN2EyNzlmY2E4Nj9tb25pdG9yPXRydWUmYXBpLXZlcnNpb249MjAyMS0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "43bf691c-4a7d-4b43-a41a-24c6a145785b" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/19.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9adeac7d-dfa6-40c2-8d4c-f84cf1898308" + ], + "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": [ + "4c5e8a88-e1ca-46ae-8cfe-40c7027c24e3" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T053943Z:4c5e8a88-e1ca-46ae-8cfe-40c7027c24e3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:39:42 GMT" + ], + "Content-Length": [ + "1500" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg1987/providers/Microsoft.Storage/storageAccounts/stopstestrg1987\",\r\n \"name\": \"stopstestrg1987\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"privateEndpointConnections\": [],\r\n \"isNfsV3Enabled\": true,\r\n \"isHnsEnabled\": true,\r\n \"networkAcls\": {\r\n \"bypass\": \"Logging, Metrics\",\r\n \"virtualNetworkRules\": [\r\n {\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/weitest/providers/Microsoft.Network/virtualNetworks/vnettry1/subnets/subnet1\",\r\n \"action\": \"Allow\",\r\n \"state\": \"Succeeded\"\r\n }\r\n ],\r\n \"ipRules\": [],\r\n \"defaultAction\": \"Allow\"\r\n },\r\n \"supportsHttpsTrafficOnly\": false,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2021-03-02T05:39:25.3078721Z\"\r\n },\r\n \"blob\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2021-03-02T05:39:25.3078721Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"accessTier\": \"Hot\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2021-03-02T05:39:25.2329123Z\",\r\n \"primaryEndpoints\": {\r\n \"dfs\": \"https://stopstestrg1987.dfs.core.windows.net/\",\r\n \"web\": \"https://stopstestrg1987.z3.web.core.windows.net/\",\r\n \"blob\": \"https://stopstestrg1987.blob.core.windows.net/\",\r\n \"queue\": \"https://stopstestrg1987.queue.core.windows.net/\",\r\n \"table\": \"https://stopstestrg1987.table.core.windows.net/\",\r\n \"file\": \"https://stopstestrg1987.file.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"eastus2euap\",\r\n \"statusOfPrimary\": \"available\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg1987/providers/Microsoft.Storage/storageAccounts/stopstestrg1987?api-version=2021-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnMTk4Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0b3BzdGVzdHJnMTk4Nz9hcGktdmVyc2lvbj0yMDIxLTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "43bf691c-4a7d-4b43-a41a-24c6a145785b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/19.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "866baeb5-2614-4571-9bce-182bd0da5fb7" + ], + "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": [ + "3d9bb1c9-88ed-473a-b935-7a496f53439c" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T053943Z:3d9bb1c9-88ed-473a-b935-7a496f53439c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:39:43 GMT" + ], + "Content-Length": [ + "1500" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg1987/providers/Microsoft.Storage/storageAccounts/stopstestrg1987\",\r\n \"name\": \"stopstestrg1987\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"privateEndpointConnections\": [],\r\n \"isNfsV3Enabled\": true,\r\n \"isHnsEnabled\": true,\r\n \"networkAcls\": {\r\n \"bypass\": \"Logging, Metrics\",\r\n \"virtualNetworkRules\": [\r\n {\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/weitest/providers/Microsoft.Network/virtualNetworks/vnettry1/subnets/subnet1\",\r\n \"action\": \"Allow\",\r\n \"state\": \"Succeeded\"\r\n }\r\n ],\r\n \"ipRules\": [],\r\n \"defaultAction\": \"Allow\"\r\n },\r\n \"supportsHttpsTrafficOnly\": false,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2021-03-02T05:39:25.3078721Z\"\r\n },\r\n \"blob\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2021-03-02T05:39:25.3078721Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"accessTier\": \"Hot\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2021-03-02T05:39:25.2329123Z\",\r\n \"primaryEndpoints\": {\r\n \"dfs\": \"https://stopstestrg1987.dfs.core.windows.net/\",\r\n \"web\": \"https://stopstestrg1987.z3.web.core.windows.net/\",\r\n \"blob\": \"https://stopstestrg1987.blob.core.windows.net/\",\r\n \"queue\": \"https://stopstestrg1987.queue.core.windows.net/\",\r\n \"table\": \"https://stopstestrg1987.table.core.windows.net/\",\r\n \"file\": \"https://stopstestrg1987.file.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"eastus2euap\",\r\n \"statusOfPrimary\": \"available\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg1987/providers/Microsoft.Storage/storageAccounts/stopstestrg1987?api-version=2021-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnMTk4Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0b3BzdGVzdHJnMTk4Nz9hcGktdmVyc2lvbj0yMDIxLTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d10eed8a-983e-4668-b203-f4873189a339" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/19.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0061c648-65c9-450b-96f6-420b942372d9" + ], + "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": [ + "f7aecbcc-f40a-4cfa-821e-81c4fdb6f312" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T053945Z:f7aecbcc-f40a-4cfa-821e-81c4fdb6f312" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:39:44 GMT" + ], + "Content-Length": [ + "1500" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg1987/providers/Microsoft.Storage/storageAccounts/stopstestrg1987\",\r\n \"name\": \"stopstestrg1987\",\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n \"location\": \"eastus2euap\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"privateEndpointConnections\": [],\r\n \"isNfsV3Enabled\": true,\r\n \"isHnsEnabled\": true,\r\n \"networkAcls\": {\r\n \"bypass\": \"Logging, Metrics\",\r\n \"virtualNetworkRules\": [\r\n {\r\n \"id\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/weitest/providers/Microsoft.Network/virtualNetworks/vnettry1/subnets/subnet1\",\r\n \"action\": \"Allow\",\r\n \"state\": \"Succeeded\"\r\n }\r\n ],\r\n \"ipRules\": [],\r\n \"defaultAction\": \"Allow\"\r\n },\r\n \"supportsHttpsTrafficOnly\": false,\r\n \"encryption\": {\r\n \"services\": {\r\n \"file\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2021-03-02T05:39:25.3078721Z\"\r\n },\r\n \"blob\": {\r\n \"keyType\": \"Account\",\r\n \"enabled\": true,\r\n \"lastEnabledTime\": \"2021-03-02T05:39:25.3078721Z\"\r\n }\r\n },\r\n \"keySource\": \"Microsoft.Storage\"\r\n },\r\n \"accessTier\": \"Hot\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"2021-03-02T05:39:25.2329123Z\",\r\n \"primaryEndpoints\": {\r\n \"dfs\": \"https://stopstestrg1987.dfs.core.windows.net/\",\r\n \"web\": \"https://stopstestrg1987.z3.web.core.windows.net/\",\r\n \"blob\": \"https://stopstestrg1987.blob.core.windows.net/\",\r\n \"queue\": \"https://stopstestrg1987.queue.core.windows.net/\",\r\n \"table\": \"https://stopstestrg1987.table.core.windows.net/\",\r\n \"file\": \"https://stopstestrg1987.file.core.windows.net/\"\r\n },\r\n \"primaryLocation\": \"eastus2euap\",\r\n \"statusOfPrimary\": \"available\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/pstestrg1987/providers/Microsoft.Storage/storageAccounts/stopstestrg1987?api-version=2021-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlR3JvdXBzL3BzdGVzdHJnMTk4Ny9wcm92aWRlcnMvTWljcm9zb2Z0LlN0b3JhZ2Uvc3RvcmFnZUFjY291bnRzL3N0b3BzdGVzdHJnMTk4Nz9hcGktdmVyc2lvbj0yMDIxLTA0LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "49e05b7e-2438-4c62-aade-0a154a4ff42b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Storage.StorageManagementClient/19.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "67466d2d-fc31-421f-8a6b-a2477a8cc166" + ], + "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": [ + "7f54ec05-9b7a-454b-a1cb-328505a21664" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T053955Z:7f54ec05-9b7a-454b-a1cb-328505a21664" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:39:54 GMT" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourcegroups/pstestrg1987?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL3Jlc291cmNlZ3JvdXBzL3BzdGVzdHJnMTk4Nz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2a4b8827-020b-4098-923a-b4a89cec981a" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzE5ODctRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "0ce7c8f9-b938-436c-b00d-c0e9ac86cdb2" + ], + "x-ms-correlation-request-id": [ + "0ce7c8f9-b938-436c-b00d-c0e9ac86cdb2" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T054000Z:0ce7c8f9-b938-436c-b00d-c0e9ac86cdb2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:39:59 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzE5ODctRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVTFSRlUxUlNSekU1T0RjdFJVRlRWRlZUTWtWVlFWQWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pKbGRXRndJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzE5ODctRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "6b691614-b72a-4c6a-8f6d-652157f872df" + ], + "x-ms-correlation-request-id": [ + "6b691614-b72a-4c6a-8f6d-652157f872df" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T054015Z:6b691614-b72a-4c6a-8f6d-652157f872df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:40:14 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzE5ODctRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVTFSRlUxUlNSekU1T0RjdFJVRlRWRlZUTWtWVlFWQWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pKbGRXRndJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzE5ODctRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "2597969c-c828-4a38-9bc9-95eb0c5fc7eb" + ], + "x-ms-correlation-request-id": [ + "2597969c-c828-4a38-9bc9-95eb0c5fc7eb" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T054031Z:2597969c-c828-4a38-9bc9-95eb0c5fc7eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:40:30 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzE5ODctRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVTFSRlUxUlNSekU1T0RjdFJVRlRWRlZUTWtWVlFWQWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pKbGRXRndJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "09c2b730-2ced-468f-b4c8-ff99bf92943c" + ], + "x-ms-correlation-request-id": [ + "09c2b730-2ced-468f-b4c8-ff99bf92943c" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T054046Z:09c2b730-2ced-468f-b4c8-ff99bf92943c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:40:45 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QU1RFU1RSRzE5ODctRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDViNjBkODUtZmQ3Mi00MjdhLWE3MDgtZjk5NGQyNmU1OTNlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVTFSRlUxUlNSekU1T0RjdFJVRlRWRlZUTWtWVlFWQWlMQ0pxYjJKTWIyTmhkR2x2YmlJNkltVmhjM1IxY3pKbGRXRndJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.29719.03", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19042.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-request-id": [ + "6f259d09-bf20-49bf-bc5e-0346a7b3f672" + ], + "x-ms-correlation-request-id": [ + "6f259d09-bf20-49bf-bc5e-0346a7b3f672" + ], + "x-ms-routing-request-id": [ + "SOUTHEASTASIA:20210302T054047Z:6f259d09-bf20-49bf-bc5e-0346a7b3f672" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 02 Mar 2021 05:40:46 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "Test-NewAzureStorageAccountEnableNfsV3": [ + "pstestrg1987" + ] + }, + "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 23144a2712d5..fb7a31963cb1 100644 --- a/src/Storage/Storage.Management/ChangeLog.md +++ b/src/Storage/Storage.Management/ChangeLog.md @@ -18,6 +18,9 @@ - Additional information about change #1 --> ## Upcoming Release +* Supported create account with EnableNfsV3 + - `New-AzStorageAccount` + * Supported create file share with NFS/SMB enabledEnabledProtocol and RootSquash, and update share with RootSquash - `New-AzRmStorageShare` - `Update-AzRmStorageShare` diff --git a/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs b/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs index fa152c3d5aac..e333a2197e6c 100644 --- a/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs +++ b/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs @@ -443,6 +443,23 @@ public bool AllowSharedKeyAccess } private bool? allowSharedKeyAccess = null; + [Parameter( + Mandatory = false, + HelpMessage = "Enable NFS 3.0 protocol support if sets to true")] + [ValidateNotNullOrEmpty] + public bool EnableNfsV3 + { + get + { + return enableNfsV3.Value; + } + set + { + enableNfsV3 = value; + } + } + private bool? enableNfsV3 = null; + [Parameter( Mandatory = false, HelpMessage = "Gets or sets allow or disallow cross AAD tenant object replication. The default interpretation is true for this property.")] @@ -679,7 +696,11 @@ public override void ExecuteCmdlet() { createParameters.AllowSharedKeyAccess = allowSharedKeyAccess; } - if(this.EdgeZone != null) + if (enableNfsV3 != null) + { + createParameters.EnableNfsV3 = enableNfsV3; + } + if (this.EdgeZone != null) { createParameters.ExtendedLocation = new ExtendedLocation() { diff --git a/src/Storage/Storage.Management/help/New-AzStorageAccount.md b/src/Storage/Storage.Management/help/New-AzStorageAccount.md index 176763c61af4..83fb5843a10e 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageAccount.md +++ b/src/Storage/Storage.Management/help/New-AzStorageAccount.md @@ -24,9 +24,9 @@ New-AzStorageAccount [-ResourceGroupName] [-Name] [-SkuName] < [-PublishMicrosoftEndpoint ] [-PublishInternetEndpoint ] [-AsJob] [-EncryptionKeyTypeForTable ] [-EncryptionKeyTypeForQueue ] [-RequireInfrastructureEncryption] [-SasExpirationPeriod ] [-KeyExpirationPeriodInDay ] [-AllowBlobPublicAccess ] - [-MinimumTlsVersion ] [-AllowSharedKeyAccess ] [-AllowCrossTenantReplication ] - [-DefaultSharePermission ] [-EdgeZone ] [-DefaultProfile ] - [-RoutingChoice ] [] + [-MinimumTlsVersion ] [-AllowSharedKeyAccess ] [-EnableNfsV3 ] + [-AllowCrossTenantReplication ] [-DefaultSharePermission ] [-EdgeZone ] + [-DefaultProfile ] [-RoutingChoice ] [] ``` ### ActiveDirectoryDomainServicesForFile @@ -43,8 +43,9 @@ New-AzStorageAccount [-ResourceGroupName] [-Name] [-SkuName] < [-ActiveDirectoryAzureStorageSid ] [-AsJob] [-EncryptionKeyTypeForTable ] [-EncryptionKeyTypeForQueue ] [-RequireInfrastructureEncryption] [-SasExpirationPeriod ] [-KeyExpirationPeriodInDay ] [-AllowBlobPublicAccess ] [-MinimumTlsVersion ] - [-AllowSharedKeyAccess ] [-AllowCrossTenantReplication ] [-DefaultSharePermission ] - [-EdgeZone ] [-DefaultProfile ] [-RoutingChoice ] [] + [-AllowSharedKeyAccess ] [-EnableNfsV3 ] [-AllowCrossTenantReplication ] + [-DefaultSharePermission ] [-EdgeZone ] [-DefaultProfile ] + [-RoutingChoice ] [] ``` ## DESCRIPTION @@ -242,6 +243,17 @@ LastKeyRotationTimestamp : 4/12/2021 8:17:57 AM This command first create a keyvault and a user assigned identity, then create a storage account with keyvault encryption (the storage access access keyvault with the user assigned identity). +### Example 13: Create account with EnableNfsV3 +``` +PS C:\> $account = New-AzStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "mystorageaccount" -SkuName Standard_LRS -Location centraluseuap -Kind StorageV2 -EnableNfsV3 $true -EnableHierarchicalNamespace $true -EnableHttpsTrafficOnly $false -NetworkRuleSet (@{bypass="Logging,Metrics"; + virtualNetworkRules=(@{VirtualNetworkResourceId="$vnet1";Action="allow"}); + defaultAction="deny"}) +PS C:\> $account.EnableNfsV3 +True +``` + +The command create account with EnableNfsV3 as true, and then show the EnableNfsV3 property of the created account + ## PARAMETERS ### -AccessTier @@ -569,6 +581,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -EnableNfsV3 +Enable NFS 3.0 protocol support if sets to true + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -EncryptionKeyTypeForQueue Set the Encryption KeyType for Queue. The default value is Service. -Account: Queue will be encrypted with account-scoped encryption key.