Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1539,16 +1539,16 @@ function Test-NewSetAzureStorageAccountTLSveresionBlobPublicAccess
Assert-AreEqual $tlsVersion $sto.MinimumTlsVersion
Assert-AreEqual $false $sto.AllowBlobPublicAccess

$tlsVersion = "TLS1_1"
Set-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -SkuName $stotype -MinimumTlsVersion $tlsVersion -AllowBlobPublicAccess $true ;
$tlsVersion = "TLS1_2"
Set-AzStorageAccount -ResourceGroupName $rgname -Name $stoname -SkuName $stotype -MinimumTlsVersion $tlsVersion -AllowBlobPublicAccess $false ;

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 $tlsVersion $sto.MinimumTlsVersion
Assert-AreEqual $true $sto.AllowBlobPublicAccess
Assert-AreEqual $false $sto.AllowBlobPublicAccess

Remove-AzStorageAccount -Force -ResourceGroupName $rgname -Name $stoname;
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.23.0" />
<PackageReference Include="Azure.Storage.Files.DataLake" Version="12.21.0" />
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.21.0" />
<PackageReference Include="Azure.Storage.Queues" Version="12.21.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.24.0" />
<PackageReference Include="Azure.Storage.Files.DataLake" Version="12.22.0" />
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.22.0" />
<PackageReference Include="Azure.Storage.Queues" Version="12.22.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Storage/Storage.Management/Az.Storage.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ CmdletsToExport = 'Add-AzRmStorageContainerLegalHold',
'Update-AzStorageBlobServiceProperty',
'Update-AzStorageEncryptionScope',
'Update-AzStorageFileServiceProperty',
'Update-AzStorageServiceProperty'
'Update-AzStorageServiceProperty',
'New-AzStorageFileHardLink'

# Variables to export from this module
# VariablesToExport = @()
Expand Down
12 changes: 12 additions & 0 deletions src/Storage/Storage.Management/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
- Additional information about change #1
-->
## Upcoming Release
* Supported NFS File Share and NFS file and directory properties
- `Get-AzStorageFile`
- `Get-AzStorageFileContent`
- `New-AzStorageDirectory`
- `Remove-AzStorageFile`
- `Set-AzStorageFileContent`
- `Start-AzStorageFileCopy`
* Supported File share properties: Protocol, EnableSnapshotVirtualDirectoryAccess.
- `New-AzStorageShare`
- `Get-AzStorageShare`
* Supported create hard link in NFS File Share
- `New-AzStorageFileHardLink`
* Added warning message for upcoming breaking change on upload Azure file
- `Set-AzStorageFileContent`
* Added warning messages for an upcoming breaking change when converting the account's redundancy configuration
Expand Down
3 changes: 3 additions & 0 deletions src/Storage/Storage.Management/help/Az.Storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ Creates a directory.
### [New-AzStorageEncryptionScope](New-AzStorageEncryptionScope.md)
Creates an encryption scope for a Storage account.

### [New-AzStorageFileHardLink](New-AzStorageFileHardLink.md)
Creates a hard link to a file in same share. Only works in NFS file share.

### [New-AzStorageFileSASToken](New-AzStorageFileSASToken.md)
Generates a shared access signature token for a Storage file.

Expand Down
8 changes: 8 additions & 0 deletions src/Storage/Storage.Management/help/Get-AzStorageFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ Get-AzStorageFile -ShareName "ContosoShare06" -Path "ContosoWorkingFolder" | Get
This command lists the files and folders in the directory ContosoWorkingFolder under the share ContosoShare06.
It first gets the directory instance, and then pipelines it to the **Get-AzStorageFile** cmdlet to list the directory.

### Example 3: List files and directories in a share, and exclude extended info
```powershell
Get-AzStorageFile -ShareName "ContosoShare06" -ExcludeExtendedInfo
```

This command lists the files and folders in under the share ContosoShare06, and exclude extended file info like timestamps, ETag, attributes, permissionKey in list file and Directory.
Currently, **-ExcludeExtendedInfo** will be needed to list files and directories from NFS file share or from a directory in NFS file share.

## PARAMETERS

### -ClientTimeoutPerRequest
Expand Down
71 changes: 62 additions & 9 deletions src/Storage/Storage.Management/help/New-AzStorageDirectory.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ Creates a directory.

### ShareName (Default)
```
New-AzStorageDirectory [-ShareName] <String> [-Path] <String> [-DisAllowTrailingDot]
[-Context <IStorageContext>] [-ServerTimeoutPerRequest <Int32>] [-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>] [-ConcurrentTaskCount <Int32>]
New-AzStorageDirectory [-ShareName] <String> [-Path] <String> [-FileMode <String>] [-Owner <String>]
[-Group <String>] [-DisAllowTrailingDot] [-Context <IStorageContext>] [-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>] [-DefaultProfile <IAzureContextContainer>] [-ConcurrentTaskCount <Int32>]
[<CommonParameters>]
```

### Share
```
New-AzStorageDirectory [-ShareClient] <ShareClient> [-Path] <String> [-Context <IStorageContext>]
[-ServerTimeoutPerRequest <Int32>] [-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>] [-ConcurrentTaskCount <Int32>]
New-AzStorageDirectory [-ShareClient] <ShareClient> [-Path] <String> [-FileMode <String>] [-Owner <String>]
[-Group <String>] [-Context <IStorageContext>] [-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>] [-DefaultProfile <IAzureContextContainer>] [-ConcurrentTaskCount <Int32>]
[<CommonParameters>]
```

### Directory
```
New-AzStorageDirectory [-ShareDirectoryClient] <ShareDirectoryClient> [-Path] <String>
[-Context <IStorageContext>] [-ServerTimeoutPerRequest <Int32>] [-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>] [-ConcurrentTaskCount <Int32>]
New-AzStorageDirectory [-ShareDirectoryClient] <ShareDirectoryClient> [-Path] <String> [-FileMode <String>]
[-Owner <String>] [-Group <String>] [-Context <IStorageContext>] [-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>] [-DefaultProfile <IAzureContextContainer>] [-ConcurrentTaskCount <Int32>]
[<CommonParameters>]
```

Expand All @@ -58,6 +58,14 @@ Get-AzStorageShare -Name "ContosoShare06" | New-AzStorageDirectory -Path "Contos
This command uses the **Get-AzStorageShare** cmdlet to get the file share named ContosoShare06, and then passes it to the current cmdlet by using the pipeline operator.
The current cmdlet creates the folder named ContosoWorkingFolder in ContosoShare06.

### Example 3: Create a folder with FileMode, Owner and Group in a NFS file share
```powershell
New-AzStorageDirectory -ShareName "contosochare06" -Path "ContosoWorkingFolder" -FileMode rwxrwSrwx -Owner 1 -Group 1
```

This command creates a folder with FileMode rwxrwSrwx, Owner 1 and Group 1.
FileMode, Owner, Group only works on NFS file share.

## PARAMETERS

### -ClientTimeoutPerRequest
Expand Down Expand Up @@ -142,6 +150,51 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -FileMode
Only applicable to NFS Directory. The mode permissions to be set on the directory. Symbolic (rwxrw-rw-) is supported.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Group
Only applicable to NFS Directory. The owner group identifier (GID) to be set on the directory. The default value is 0 (root group).

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Owner
Only applicable to NFS Directory. The owner user identifier (UID) to be set on the directory. The default value is 0 (root).

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Path
Specifies the path of a folder.
This cmdlet creates a folder for the path that this cmdlet specifies.
Expand Down
Loading