-
Notifications
You must be signed in to change notification settings - Fork 3k
Azure CLI storage preview extension 2.0.9 readme
This storage-preview extension 2.0.9 is published with ADLS Gen2 filesystem operations support in az storage blob directory
command group. This includes:
- New directory level operations (create/delete/download/exists/list/move/show/upload/metadata show/metadata update) for both hierarchical namespace enabled (HNS) storage accounts and HNS disabled storage accounts. For HNS enabled accounts, the move/delete operations are atomic.
- Permission related operations (access set/access show/access update) for hierarchical namespace enabled (HNS) accounts.
In addition, you can use existing storage blob commands for your ADLS Gen2 account.
ADLS Gen1 | ADLS Gen2 |
---|---|
az dls fs | az storage blob directory |
az dls fs access | az storage blob directory access |
az dls fs access remove-all | NO |
az dls fs access remove-entry | NO |
az dls fs access set | az storage blob directory access set |
az dls fs access set-entry | NO |
az dls fs access set-owner | az storage blob directory access update |
az dls fs access set-permission | az storage blob directory access update |
az dls fs access show | az storage blob directory access show |
az dls fs append | NO |
az dls fs create | az storage blob directory create |
az dls fs delete | az storage blob directory delete |
az dls fs download | az storage blob directory download |
az dls fs join | NO |
az dls fs list | az storage blob directory list |
az dls fs move | az storage blob directory move |
az dls fs preview | NO |
az dls fs remove-expiry | NO |
az dls fs set-expiry | NO |
az dls fs show | az storage blob directory show |
az dls fs test | az storage blob directory exists |
az dls fs upload | az storage blob directory upload |
NO | az storage blob directory metadata show |
NO | az storage blob directory metadata update |
- az storage blob move
- az storage blob access
- az storage blob access set
- az storage blob access update
- az storage blob access show
Install this extension using the below CLI command
az extension add --name storage-preview
Note: Please make sure storage-preview version >= 2.0.9 with azure cli >= 2.0.67. If not, please install upgrade azure-cli version and use az extension update -n storage-preview
to upgrade storage-preview extension.
az storage blob directory access set -a "user::rwx,group::r--,other::---" -d MyDirectoryPath -c MyContainer --account-name MyStorageAccount
az storage blob directory access show -d MyDirectoryPath -c MyContainer --account-name MyStorageAccount
az storage blob directory access update --permissions "rwxrwxrwx" -d MyDirectoryPath -c MyContainer --account-name MyStorageAccount
az storage blob directory access update --owner [entity id or UPN] -d MyDirectoryPath -c MyContainer --account-name MyStorageAccount
az storage blob directory access update --group [entity id or UPN] -d MyDirectoryPath -c MyContainer --account-name MyStorageAccount
az storage blob directory create -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
This operation's behavior is different depending on whether Hierarchical Namespace
is enabled; if yes, then the delete operation can be atomic and instantaneous;
if not, the operation is performed in batches and a continuation token could be returned.
az storage blob directory delete -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
az storage blob directory download -c MyContainer --account-name MyStorageAccount -s "path/to/blob" -d ""
az storage blob directory download -c MyContainer --account-name MyStorageAccount -s SourceDirectoryPath -d "" --recursive
az storage blob directory download -c MyContainer --account-name MyStorageAccount -s "path/to/subdirectory" -d "" --recursive
az storage blob directory exists -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
az storage blob directory list -c MyContainer -d DestinationDirectoryPath --account-name MyStorageAccount
az storage blob directory metadata show -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
az storage blob directory metadata update --metadata tag1=value1 -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
Move a storage directory and all its content (which can contain other directories or blobs) to another storage
blob directory in a storage container. This operation's behavior is different depending on whether Hierarchical
Namespace is enabled; if yes, the move operation is atomic and no marker is returned; if not, the operation is
performed in batches and a continuation token could be returned.
az storage blob directory move -c MyContainer -d DestinationDirectoryPath -s SourceDirectoryPath --account-name MyStorageAccount
az storage blob directory show -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
az storage blob directory upload -c MyContainer --account-name MyStorageAccount -s "path/to/file" -d directory
az storage blob directory upload -c MyContainer --account-name MyStorageAccount -s "path/to/directory" -d directory --recursive
az storage blob access update --permissions "rwxrwxrwx" -b MyBlob -c MyContainer --account-name MyStorageAccount
az storage blob access update --owner [entity id or UPN] -b MyBlob -c MyContainer --account-name MyStorageAccount
az storage blob access update --group [entity id or UPN] -b MyBlob -c MyContainer --account-name MyStorageAccount
az storage blob move -c MyContainer -d DestinationBlobPath -s SourceBlobPath --account-name MyStorageAccount